Help starting rails

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
=> 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
=> 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

On Tue, Mar 10, 2009 at 2:08 PM, Jeremy W.
[email protected] 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/

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 :frowning:

Thanks for the idea, any others?

~Jeremy

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?

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 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 :slight_smile:

~Jeremy

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 www.maxwellrender.cz www.lightgems.cz