# Help starting rails

**URL:** <https://www.ruby-forum.com/t/help-starting-rails/162517>\
**Category:** Rails\
**Created:** [March 10, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517 "2009-03-10T20:08:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 10, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/1 "2009-03-10T20:08:58Z")

</div>

I have a weird issue. I can’t start my rails project…

I was working on it yesterday, and everything was fine. I came into work  
today and I can’t boot it up…

The server comes up fine when I run ruby script/server, but when I go to  
my browser and type localhost:3000, I get a can’t establish a connection  
to the server at localhost:3000.

I have tried this in FireFox 3, I.E. 7, Chrome, Opera 9.6, Safari(win),  
I tried switching the port with ruby script/server -p 3001, I have tried  
restarting my machine.

I don’t have any firewalls, haven’t done any updates on any gems. I have  
have tried using both mongrel and webrick. I can hop into console with  
ruby script/console in another window, and finding an object will show  
the queries in the server window.

Here is what comes up with each server.

C:\rails\_apps\vwd\_login\>ruby script/server webrick  
=\> Booting WEBrick…  
=\> Rails 2.1.0 application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2009-03-10 11:54:44] INFO WEBrick 1.3.1  
[2009-03-10 11:54:44] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32]  
[2009-03-10 11:54:44] INFO WEBrick::HTTPServer#start: pid=3264  
port=3000  
[2009-03-10 11:55:42] INFO going to shutdown …  
[2009-03-10 11:55:42] INFO WEBrick::HTTPServer#start done.

* * *

C:\rails\_apps\vwd\_login\>ruby script/server  
=\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)  
=\> Rails 2.1.0 application starting on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Call with -d to detach  
=\> Ctrl-C to shutdown server  
\*\* Starting Mongrel listening at 0.0.0.0:3000  
\*\* Starting Rails with development environment…  
\*\* Rails loaded.  
\*\* Loading any Rails specific GemPlugins  
\*\* Signals ready. INT =\> stop (no restart).  
\*\* Mongrel 1.1.5 available at 0.0.0.0:3000  
\*\* Use CTRL-C to stop.

* * *

C:\rails\_apps\vwd\_login\>ruby -v  
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\rails\_apps\vwd\_login\>rails -v  
Rails 2.2.2

C:\rails\_apps\vwd\_login\>ver  
Microsoft Windows [Version 6.0.6001] (yes, I know this is an issue, but  
besides this)

C:\rails\_apps\vwd\_login\>gem -v  
1.3.1

Any ideas on what I’m missing?

Thanks,  
~Jeremy

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 10, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/2 "2009-03-10T20:22:00Z")

</div>

On Tue, Mar 10, 2009 at 2:08 PM, Jeremy W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have a weird issue. I can’t start my rails project…
> 
> I was working on it yesterday, and everything was fine. I came into work  
> today and I can’t boot it up…
> 
> The server comes up fine when I run ruby script/server, but when I go to  
> my browser and type localhost:3000, I get a can’t establish a connection  
> to the server at localhost:3000.

Check that your hosts file doesn’t have any “new” entries added to it  
since yesterday. I’ve seen spyware prevention apps add stuff in there  
sometimes.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 10, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/3 "2009-03-10T20:39:39Z")

</div>

Greg D. wrote:

> Check that your hosts file doesn’t have any “new” entries added to it  
> since yesterday. I’ve seen spyware prevention apps add stuff in there  
> sometimes.

I checked it, seems it was missing a line…

It had, ::1 localhost  
and I added 127.0.0.1 localhost

Still doesn’t work though ☹

Thanks for the idea, any others?

~Jeremy

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 10, 2009, 9:04pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/4 "2009-03-10T21:04:04Z")

</div>

hmm, ok… so it’s working now… kinda…

It only works when I have my port set to 80.

So, doing ruby script/server -p 80

Why would this be?

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 11, 2009, 4:19pm UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/5 "2009-03-11T16:19:06Z")

</div>

Tom Z Meinlschmidt wrote:

> Jeremy W. wrote:
> 
> > hmm, ok… so it’s working now… kinda…
> > 
> > It only works when I have my port set to 80.
> > 
> > So, doing ruby script/server -p 80
> > 
> > Why would this be?
> 
> try to add -b 127.0.0.1 for sure…
> 
> script/server -p 3000 -b 127.0.0.1
> 
> if it doesn’t work, post your netstat table
> 
> t
> 
> # –
> 
> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache
> 
> # [www.meinlschmidt.com](http://www.meinlschmidt.com) www.maxwellrender.cz www.lightgems.cz

ok, so I decided I would try it the normal way before trying your  
method, and what do you know… it worked… I’m thinking maybe some  
co-workers messing with me after I leave for the day or something…

Anyway, Thanks everyone. This has taught me a big more about trouble  
shooting a rails app which I don’t know much about 🙂

~Jeremy

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [March 11, 2009, 1:26am UTC](https://www.ruby-forum.com/t/help-starting-rails/162517/6 "2009-03-11T01:26:09Z")

</div>

Jeremy W. wrote:

> hmm, ok… so it’s working now… kinda…
> 
> It only works when I have my port set to 80.
> 
> So, doing ruby script/server -p 80
> 
> Why would this be?

try to add -b 127.0.0.1 for sure…

script/server -p 3000 -b 127.0.0.1

if it doesn’t work, post your netstat table

t

# –

Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

# [www.meinlschmidt.com](http://www.meinlschmidt.com) www.maxwellrender.cz www.lightgems.cz
