Philip Jones
Philip Jones

Reputation: 25

Rails server does not start - Windows 10, Rails 4.1.8, Ruby 2.1

I am running Ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32] Rails 4.1.8 RubyGems 2.2.3

I have done the bundle install and ran the server. Errors. I did a rails server --binding=127.0.0.1 and that did not work. I have changed the port from 3000 to 9001 and that did not work. I have changed and even deleted the PID and that did not work.

All I want to do is run the server.

Any help is greatly appreciated.

Here is the error message:

C:\Sites\NOOB>rails s
=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using     127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2015-08-19 12:06:56] INFO  WEBrick 1.3.1
[2015-08-19 12:06:56] INFO  ruby 2.1.5 (2014-11-13) [i386-mingw32]
Exiting
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:206:in `bind': Permission denied - bind(2) for 0.0.0.0:3000 (Errno::EACCES)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:206:in `listen'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:461:in `block in tcp_server_sockets'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:232:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:232:in `foreach'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/socket.rb:459:in `tcp_server_sockets'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/utils.rb:75:in `create_listeners'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:132:in `listen'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:113:in `initialize'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:45:in `initialize'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:11:in `new'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:11:in `run'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.5/lib/rack/server.rb:264:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:69:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Upvotes: 1

Views: 1127

Answers (2)

bsquad
bsquad

Reputation: 106

This is the solution:

gem source -r https://rubygems.org/

gem source -a http://rubygems.org/

Upvotes: 0

bsquad
bsquad

Reputation: 106

This is the solution:

Upvotes: 2

Related Questions