Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't Safari connect to the sever "localhost"?

I am learning Ruby on rails from a PDF on ruby.railstutorial.org. I have been learning for about a week and a half now and have not had any trouble until yesterday. I was building a sample app and tried to look at some results in the browser but for some reason it says 'safari can't open page "localhost:3000/static_pages/home" because Safari cannot connect to the server "localhost".

  • I am on OS X Mavericks 10.9.2
like image 893
user3424974 Avatar asked Oct 02 '22 05:10

user3424974


2 Answers

Try http://0.0.0.0:3000. That works for me. Not sure why Safari doesn't like localhost.

like image 183
Adam Bishti Avatar answered Oct 13 '22 12:10

Adam Bishti


Try 127.0.0.1, enable web sharing in System Preferences, and if running, turn off Apache.

Source

like image 41
hunterboerner Avatar answered Oct 13 '22 10:10

hunterboerner