Rails Preview Review with 4.2beta Rails

After doing a git clone for the project I'm working on, I updated my rails in nitrous and Rails 4.2.0.beta2 Running 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?

+4
source share
1 answer

Just encountered the same problem that first created the rails project on Nitrous.io. The problem is that you need to change the IP address of the server from localhost: 3000 to 0.0.0.0ause000.

To do this, you must change the rails server settings in a nitrogen-based command window. Try the following:

rails server -b, --binding=0.0.0.0

rails 0.0.0.0. , . .

: http://smyck.net/2007/03/11/how-to-bind-webrick-to-any-ip-address/ , :

rails server -h
+4

All Articles