Problem connecting to localhost:3000

Hi,
After typing “rails server”, I tried to go to http://localhost:3000, as
well as http://0.0.0.0:3000, but I got an error message. In the first
case, I get: Connection refused. For the second one, there was an error
about no DNS entry?
Help!

On Mar 3, 2011, at 12:06 PM, Gaba L. wrote:

Hi,
After typing “rails server”,

Please paste in what you see in Terminal after you typed this. You
might also see some sort of traffic log from the first try (the one
that was refused). Also, what does your /etc/hosts file look like? Do
you have the Firewall up? (not sure that matters on localhost, but
worth a try)

Walter

Walter,
This is what I get when I type in “rails server”

=> Booting WEBrick
=> Rails 3.0.4 application starting in development on
http://0.0.0.0:3000
=> call with -d to detach
=> Ctrl-C to shutdown server

[2011-03-03 12:20:42] INFO WEBrick 1.3.1
[2011-03-03 12:20:42] INFO ruby 1.8.7 (2011-02-18) [i386-mingw32]
[2011-03-03 12:20:42] INFO WEBrick::HTTPServer#start: pid = 1604 port
=3000

How do i check to see what my etc/hosts file look like? It’s in a demo
app, in views, with a basic index.html. How do I check re: firewall?
Thanks!

I have windows. When I type in “edit /etc/hosts”, I get
MS-DOS Editor
Version 2.0.026
Copyright © Microsoft Corp 1995

Is there something in particular I should look for here? I get
/B - Forces monochrome mode
/H - Displays the maximum number of lines possible for your hardware
.
.
.

On Mar 3, 2011, at 12:22 PM, Gaba L. wrote:

How do i check to see what my etc/hosts file look like? It’s in a
demo
app, in views, with a basic index.html. How do I check re: firewall?
Thanks!

If you’re using a Mac, and TextMate, type mate /etc/hosts in your
Terminal. If you don’t have TextMate, you can use your favorite
command-line editor through the generic (alias) command edit, as in
edit /etc/hosts. Or nano /etc/hosts for that very easy-to-use editor.

Again, on the Mac, the firewall is configured in the System
Preferences app, in the Security section.

On other platforms, I can’t say for sure about either of these. On
anything Unix-like, edit /etc/hosts should get you something.

Walter

So…how can I get http://localhost:3000 to display? Or connect to the
host, given that it seems like when I type “rails server” i get the
standard booting webrick messages…?

On Thu, Mar 3, 2011 at 9:52 AM, Walter Lee D. [email protected]
wrote:

On other platforms, I can’t say for sure about either of these.

[2011-03-03 12:20:42] INFO ruby 1.8.7 (2011-02-18) [i386-mingw32]

Doesn’t the last part of that line indicate Windows?


Hassan S. ------------------------ [email protected]
twitter: @hassan

Also, try http://lvh.me:3000

mmmh, both failed…thoughts?

Sorry, that is, the error is still “Connection refused.”

On Thu, Mar 3, 2011 at 12:10 PM, Gaba L. [email protected]
wrote:

I have windows. When I type in “edit /etc/hosts”, I get
MS-DOS Editor
Version 2.0.026
Copyright (c) Microsoft Corp 1995

Is there something in particular I should look for here? I get
/B - Forces monochrome mode
/H - Displays the maximum number of lines possible for your hardware

On Windows XP your hosts file is located at
C:\Windows\system32\drivers\etc\hosts. Run the following and let us know
what is in it.

edit C:\Windows\system32\drivers\etc\hosts

B.

On 3 Mar 2011, at 18:22, Gaba L. [email protected] wrote:

So…how can I get http://localhost:3000 to display? Or connect to the
host, given that it seems like when I type “rails server” i get the
standard booting webrick messages…?

Did you check the windows firewall (or any other firewall you may have
installed)? Worth tryin 127.0.0.1:3000 as well, I’ve occasionally had
localhost resolve to an ipv6 address somehow

Fred

Copyright (c) 1993-1999 Microsoft Corp.

This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

This file contains the mappings of IP addresses to host names. Each

entry should be kept on an individual line. The IP address should

be placed in the first column followed by the corresponding host name.

The IP address and the host name should be separated by at least one

space.

Additionally, comments (such as these) may be inserted on individual

lines or following the machine name denoted by a ‘#’ symbol.

For example:

102.54.94.97 rhino.acme.com # source server

38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

That’s what I get.

thanks!

Turn if off completely? Done. Still not working :frowning:

On Fri, Mar 4, 2011 at 11:18 AM, Gaba L. [email protected]
wrote:

Additionally, comments (such as these) may be inserted on individual

lines or following the machine name denoted by a ‘#’ symbol.

For example:

102.54.94.97 rhino.acme.com # source server

38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

This is good. Next thing is to turn off your Windows Firewall. It’s
under
Control Panel->Windows Firewall.

B.

On Fri, Mar 4, 2011 at 1:38 PM, Frederick C.
<[email protected]

wrote:

Any other 3rd party firewall software ?

By 3rd party Fred means Norton, McAfee, etc.

B.

Mmh, how can I check?

On Fri, Mar 4, 2011 at 2:46 PM, Gaba L. [email protected]
wrote:

Mmh, how can I check?

Look in your system tray for it. You can also check your Add & remove
Programs list.

Any other 3rd party firewall software ?

Sent from my iPhone