themacguy234
themacguy234

Reputation: 1

Rails server command problem

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

Thanks!

Upvotes: 0

Views: 259

Answers (2)

thekindofme
thekindofme

Reputation: 3866

  • 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

Upvotes: 0

Jakub Hampl
Jakub Hampl

Reputation: 40533

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.

Upvotes: 2

Related Questions