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>'
  • Seems like there is already a server running. Did you try to reboot your computer? – spickermann Aug 19 '15 at 17:21
  • Did you get the same error when you run `rails s --binding=127.0.0.1`? Also, do try rebooting your machine. – nicholas79171 Aug 19 '15 at 17:36
  • try rails s -b 0.0.0.0 – bkunzi01 Aug 19 '15 at 17:38
  • Try running `cmd` As Administrator and then doing `rails s` – Loqman Aug 19 '15 at 18:48
  • Thank you guys for jumping on my question. I had to re-install Windows 10 and then install Ruby 1.9.3 with the SSL workaround - https://gist.github.com/luislavena/f064211759ee0f806c88. Thank you for your help. I am going to install a Linux partition on my desktop soon!! – Philip Jones Aug 23 '15 at 15:29

2 Answers2

1

This is the solution:

bsquad
  • 66
  • 8
0

This is the solution:

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

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

bsquad
  • 66
  • 8