views:

296

answers:

1

Hi Group,

I have a Ruby on Rails (Rails v2.0.2) application which I have developed using Netbeans 6.1 on Mac OS X.

When I tried to run this application this evening (it was working fine this morning) I get the error:

'could not connect to the web server - cannot show http://localhost:3000'

When I try to run the application from terminal using: ./script/server

I get the following error:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 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... nil Exiting

Can anyone please help me resolve this issue.

Thanks in advance.

Kind Regards

Walter

+1  A: 

I don't believe there is enough info here to correctly diagnose the issue.

You could try running it with debugging: ruby -d ./script/server. You will probably find an exception being raised shortly before it exits. With a bit of luck the exception will make sense to you.

If that fails, try and narrow the problem scope by running a simple task (rake -T or ./script/runner 'puts "OK"').

Worst case, try starting it up with a full debugger and set a breakpoint on NilClass#to_str / #to_s. That pesky nil in your output is the only clue I can see.

cwninja
I know this is not really an answer, but I needed more space and formatting than the comments allow.
cwninja
For the record, I never claimed that passenger would fix anything; just that it would be helpful in determining if the problem lay in Mongrel or in his application code.
neezer
Sorry, did not intend to imply that. Amended.
cwninja
Thanks cwninja. I'll give that a try.
Walter Lockhart