Lou Lou - 1 year ago 92
Ruby Question

Why does Ruby on Rails use instead of http://localhost:3000?

I am very new to Ruby on Rails so when I tried to follow the official "Getting Started" ruby on rails tutorial, I was a bit disappointed because it went wrong very quickly. Basically it said :

…navigate to http://localhost:3000. You should see Rails’ default information page.

But when I follow the instructions, I get

=> Rails 2.3.4 application starting on

After trying both addresses, I know that they point to the same thing, but can someone explain to me why Ruby on Rails uses
instead of

Is there a way to always have the WEBbrick server use localhost ?

Answer Source

Localhost means quite literally "your local host", usually identified by and all traffic to that address is routed via a loopback interface. If your Web server is listening for connections on, this means that it only accepts requests coming from the same host. means that Rails is listening on all interfaces, not just the loopback interface.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download