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

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

Thanks in advance.


removed_email_address@domain.invalid 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.



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
permissions of dispatch.(f)cgi to 755?

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


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


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


Particularly in regard to using FastCGI:


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



Tom W. wrote:


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.