1

Possible Duplicate:
Why does Ruby on Rails use 0.0.0.0:3000 instead of localhost:3000?

I am starting my server locally and for some reason I am noticing this line there:

=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000

Is that normal? My /etc/hosts file:

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

127.0.0.1       app.cmply.local
127.0.0.1       api.cmply.local
127.0.0.1       m.cmply.local

But I had just experimented with taking out the first line there. Could that have caused the problem? I put the first line back, but the server still says http://0.0.0.0

Any idea why that might be happening?

Community
  • 1
  • 1
Awesomeness
  • 2,501
  • 3
  • 18
  • 18

2 Answers2

4

0.0.0.0 means that it's listening on all interfaces; in other words, anybody who knows your IP address can access your Rails application. This is normal.

Venge
  • 2,417
  • 16
  • 21
0

Yes, that is the standard address for your application when running the rails server command, when you run that in the terminal you'll see:

$ cd commandsapp
$ rails server
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

the line:

=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000

is letting you know that your app will be viewable at said address in your browser.

check out the railsguides link I posted for more info.

http://guides.rubyonrails.org/command_line.html

mrtriangle
  • 542
  • 11
  • 28