0
votes

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
Just curious; is there any reason you're not using Passenger? (modrails.com) I gave up Mongrel long ago...neezer
Hi neezer. Do you think that Passnger would solve this issue?Walter Lockhart
Well, Passenger is just an alternate method of serving your app, so it wouldn't "solve" your issues with Mongrel; you'd use it in place of Mongrel. If you're on a Mac, there's even a preference pane that makes this setup dead-easy (fngtps.com/2008/06/putting-the-pane-back-into-deployment).neezer
Ahh, you are on a Mac. Should have re-read the question. :)neezer
Hi neezer. Can you help me with this issue?Walter Lockhart

1 Answers

1
votes

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.