4

After doing git clone for a project I'm working on I updated my rails in nitrous and to Rails 4.2.0.beta2 Run rails server

=> Booting WEBrick                                                                                                                                                                                                    
=> Rails 4.2.0.beta2 application starting in development on http://localhost:3000                                                                                                                                     
=> Run `rails server -h` for more startup options                                                                                                                                                                     
=> Ctrl-C to shutdown server                                                                                                                                                                                          
[2014-12-02 20:13:56] INFO  WEBrick 1.3.1                                                                                                                                                                             
[2014-12-02 20:13:56] INFO  ruby 2.1.4 (2014-10-27) [x86_64-linux]                                                                                                                                                    
[2014-12-02 20:13:56] INFO  WEBrick::HTTPServer#start: pid=495 port=3000                                                                                                                                              
^C[2014-12-02 20:14:48] INFO  going to shutdown ...                                                                                                                                                                   
[2014-12-02 20:14:48] INFO  WEBrick::HTTPServer#start done.  

I go to port 3000

 We couldn't find a server running on this port – are you sure there is a server running?
Make sure to bind your server to host 0.0.0.0 (instead of localhost/127.0.0.1).

What am I doing wrong?

ryanb082
  • 101
  • 2
  • 11
  • After checking out a little more about it and seeing @Steph answer, I found that this issue is due to a change in Rails 4.2. There's more information in [this related question](http://stackoverflow.com/a/27678343/1672007) – Roberto S. Apr 03 '15 at 17:59

1 Answers1

4

Just encountered the same issue setting up a rails project on Nitrous.io for the first time. The problem is that you need to change the server IP from localhost:3000 to 0.0.0.0:3000.

To do this, you must change the rails server settings in your nitrous command line window. Try this:

rails server -b, --binding=0.0.0.0

This will change the rails server settings to 0.0.0.0. When you start up the rails server again, it should work. This was my working solution.

You can find this info about making these kinds of changes on this site: http://smyck.net/2007/03/11/how-to-bind-webrick-to-any-ip-address/ or in the command line, using the command:

rails server -h
Steph
  • 41
  • 3