# 500 Server Error when running dispatch.\*

**URL:** <https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694>\
**Category:** Rails\
**Created:** [November 12, 2005, 12:50pm UTC](https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694 "2005-11-12T12:50:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [November 12, 2005, 12:50pm UTC](https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694/1 "2005-11-12T12:50:09Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [November 12, 2005, 2:00pm UTC](https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694/2 "2005-11-12T14:00:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [November 12, 2005, 2:10pm UTC](https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694/3 "2005-11-12T14:10:14Z")

</div>

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](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](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/](http://convergentarts.com/)

Particularly in regard to using FastCGI:

[http://convergentarts.com/pages/fastcgi](http://convergentarts.com/pages/fastcgi)

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

-Tom

---

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [November 13, 2005, 7:08pm UTC](https://www.ruby-forum.com/t/500-server-error-when-running-dispatch/47694/4 "2005-11-13T19:08:07Z")

</div>

Tom W. wrote:

> [Non-Existent Domain](http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage)  
> [http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage](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.
