500 Server Error when running dispatch.*

Hi all, I’m trying to setup an app on Dreamhost but was getting the
‘Rails application failed to start’ message.

To track this down, I tried to run the dispatchers directly to see
what’s happening. Here’s the output:

[fig]$ ./public/dispatch.rb
Status: 500 Internal Server Error

The site runs fine if I start the server:

[fig]$ ./script/server
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2005-11-11 15:53:33] INFO WEBrick 1.3.1
[2005-11-11 15:53:33] INFO ruby 1.8.2 (2005-04-11) [i386-linux]
[2005-11-11 15:53:33] INFO WEBrick::HTTPServer#start: pid=24193
port=3000

Does anyone have any ideas on where to look to track this down further?

Thanks in advance.

[email protected] wrote:

[fig]$ ./public/dispatch.rb
Status: 500 Internal Server Error

Does anyone have any ideas on where to look to track this down further?

Take a look at log/development.log.

Richard,

Can you elaborate a little on what you’ve done so far? Are you using
FastCGI? Have you set the path to Ruby in dispatch.(f)cgi? Have you set
the
permissions of dispatch.(f)cgi to 755?

Are you running in production or development mode? If you haven’t
explicitly
set it to development, you’ll be in production and will need that
database
configured in your database.yml file. You should mostly run in
production
mode, btw (see point 3):

http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage

Here are a couple of resources with lots of info on the above questions.
The
DreamHost wiki has step-by-step instructions on setting up an app to run
there:

http://wiki.dreamhost.com/index.php?title=Ruby_on_Rails

My blog has quite a few articles on running Rails apps at DreamHost:

http://convergentarts.com/

Particularly in regard to using FastCGI:

http://convergentarts.com/pages/fastcgi

Let me know if you’ve tried those things with no luck.

-Tom

Tom W. wrote:

Non-Existent Domain
http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage

The same error came up on all dispatch files. Including dispatch.rb

I’m running the file from the command line, so any problems such as
database issues are all usually displayed in the output.

That’s what was confusing me here. Running the script directly from the
commandline usually gives all the details of whats going wrong. Any
issues such as incorrect paths, bad database settings would all be easy
to spot. Just outputting ‘500 Server Error’ seemed a bit odd.

It seems to be working now though, after no changes by myself. So maybe
it was an intermittent error on the server.