Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?
Localhost means quite literally "your local host", usually identified by 127.0.0.1 and all traffic to that address is routed via a loopback interface. If your Web server is listening for connections on 127.0.0.1, this means that it only accepts requests coming from the same host.
0.0.0.0 means that Rails is listening on all interfaces, not just the loopback interface.
Rails starting in dev, says server is http://0.0.0.0
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.
Can't open http://localhost:3000 - why?
To kill all processes using port 3000 run kill -9 $(lsof -i tcp:3000 -t)
.
Rails not connecting on port 3000
Could you try start rails server with:
$ bundle exec rails server -b 0
Then go to http://localhost:3000
Related Topics
How to Find If a String Starts with Another String in Ruby
Rails Link_To External Site, Url Is Attribute of User Table, Like: @Users.Website
Get Absolute (Base) Url in Sinatra
How to Reverse Ruby's Include Function
How to Add a Virtual Attribute to a Model in Ruby on Rails
Rails How to Update a Column After Saving
How to Add a Primary Key to a Table in Rails
How to Write a Ruby Command Line App That Supports Tab Completion
How to Use "Puts" to the Console Without a Line Break in Ruby on Rails
Extracting the Last N Characters from a Ruby String
How to Check Whether a Value in a String Is an Ip Address
Rails: Copying Attributes from an Object to Another Using the "Attributes" Method
Param Is Missing or the Value Is Empty: User Rails 4
How to Test If a Div Has a Certain CSS Style in Rspec/Capybara