Can't connect to localhost:3000

46 views
Skip to first unread message

mike...@comcast.net

unread,
Oct 14, 2014, 10:05:13 PM10/14/14
to rubyonra...@googlegroups.com
The hard drive on my Macbook recently failed.  A local shop replaced it and restored data from the failing drive.  Thereafter, I couldn't start the the rails server on rails apps that previously had worked as expected.  I subsequently rebuilt rails 2.1.3 under rvm.  Now, rails -s starts WEBrick successfully, but I can only connect on 0.0.0.0:3000 rather than on localhost:3000 as I from rails apps that allowed it just a couple of days ago.  I added the tzinfo-data gem as suggested on some related posts, but still no joy.  I'm running rails 4.1.6 on ruby 2.1.3p242 under 0SX 10.9.5.  Can anyone suggest how I might proceed from here?

Regards,

Mike

grze...@niewisiewicz.pl

unread,
Oct 15, 2014, 7:15:12 AM10/15/14
to rubyonra...@googlegroups.com
Hi Mike,

Maybe the resolver is the issue? Can you connect to 127.0.0.1:3000?

You can also check where the process is binding. On Linux that would be `netstat -ntlp` - look for you Rails app there. That may work on a Mac but I'm not sure.

Best regards
--
Greg

jsnark

unread,
Oct 15, 2014, 8:36:55 AM10/15/14
to rubyonra...@googlegroups.com
On *nix systems, the file /etc/hosts contains the mapping from localhost to 127.0.0.1.  It should contain a line like:

127.0.0.1               localhost.localdomain localhost

I do not know whether or not Mac uses the same file.
Reply all
Reply to author
Forward
0 new messages