开发者

Rails server command problem

开发者 https://www.devze.com 2023-02-24 10:25 出处:网络
I have a macbook pro os 10.6.6. When running rails server and load http://0.0.0.0:3000开发者_如何学C the page tries to load for awhile then gives a \"connection has timed out error\". Has anyone had t

I have a macbook pro os 10.6.6. When running rails server and load http://0.0.0.0:3000开发者_如何学C the page tries to load for awhile then gives a "connection has timed out error". Has anyone had this problem before?

Thanks!


You're probably hitting another computer in your local network. See ↓.

Try http://localhost:3000/.

You can also try your actual IP address which you'll find in System Preferences > Network.


  • Make sure webrick is running. You should see a ruby process when you execute the following command.

    ps aux | grep rails

  • Make sure webrick is listening on your localhost.

    sudo lsof -i -P | grep -i "listen"

You should see something like

ruby      5710         username    7u  IPv4 0x12d3b680      0t0    TCP *:3000 (LISTEN)

as the output. If you don't see it webrick is not running.

  • You can try running a different web server ie: ./script/server webrick instead of the default mongrel
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号