Rails application won't start



I’ve read the wiki many many times and tried a load of possible combinations - but still this thing is not working and it’s killing me!

I have a rails app that I can query using ruby script/console via ssh - all those work so I know something’s working, and the connection to the mysql database is OK

I can run ruby dispatch.fcgi from ssh too and get a 500 error html page returned, which is as it should be (right?)

But if I try to browse to any page, like


the page takes ages to do something and then returns a

Application error
Rails application failed to start properly


my rails app is in /fhdev/ with a public folder that is set up through the dreamhost control panel to be the web directory. I know that has worked because i have files in there before that I have been able to view. and the favicon works…

Any ideas?? I am going a bit mad (and have a deadline to meet…)

Thanks in advance for your help.



I’ve got the same problem, already wrote to the support 2 days ago but they are swamped right now. 3 days ago, rails worked and then the next day it just stopped working, page loads and loads and then I get the same error as you’ve encountered.

Which server are you on? I’m on PEZ, maybe the server has a problem.


I’m on edendale…

FastCGI: incomplete headers (0 bytes) received from server
in the apache error logs.

Going to write to support now.

Shouldn’t there be some kind of tool that can say exactly what the problem is? FastCGI seems so murky!



I get the same error message with “headers (0 bytes) received from server” and also “dispatch.fcgi” aborted: (first read) idle timeout (120 sec)".

As far as I know FastCGI is not this popular, so maybe it will get better in the future with all the Rails developers using it now.


The support fixed my problem by restarting the server and doing a chmod 755 on dispatch.fcgi


There’s definitley more wrong for me. I can’t get ‘irb’ to start on crunch. It bombs out with:

/usr/bin/irb:10:in `require’: no such file to load – irb (LoadError)
from /usr/bin/irb:10

Looking around, I see the directory tree where Ruby and friends are installed appears to be mangled in the same way that the Ruby install on almost every hosted machine was sometime late last week (although on those machines the problem was fixed about 12 hours after it first manifested). The dir structure is:


One would hope that the fix here is the same as, or at least not more difficult than, the one that they applied to the other machines last week. I just hope they fix things soon since I’m currently utterly blocked on work for a client who we referred to DreamHost… :frowning:


jerryk… I also have found the same problem on Crunch. Irb is not working and the rails application as such can’t find irb. Your statement is correct and I hope we can get this fixed as soon as possible. Please look into this issue on crunch DH!


I got a quite timely phone call back from DH support yesterday and it sounded like they were looking into it… I got a bit worried later on when someone sent me mail and told me things were fine on the machine and asked me to check my code… :slight_smile: But, as far as I know, they’re still investigating. It’s hard for me to examine my code (which is running entirely without trouble on another DH host as we speak anyway) for problems when Ruby itself can’t start! Also since at least part of the visible problem and its symptoms appears related to the problem that happened on a bunch of other DH machines last week, one would hope that the same remedy could be applied.

It’s possible to hack the boot.rb file in a modestly unholy way to work around the path malformation, but that will of course break once the underlying problem is fixed properly. Such a fix also assumes that one of the munged overlapping installs is actually perfect, which is a bit of a long shot given the structural problem. When I did such a hack I found I couldn’t run my site in FastCGI anymore. Troubleshooting further is difficult because I know there’s the other underlying problem, and it could easily be my path hack that’s messing things up further.

I hope they fix things up quickly since this is for a project for a client that I hope to be taking live by the end of the week so that we can start a DNS switchover from their previous host… :frowning:

Good luck with your woes… please report any further insights, info, or progress you come by here… It’s nice to know that one is not alone in one’s troubles…


Possible Fix:
I had the same problem (site hanging and error messages) on their ‘Dorito’ server.
DH Tech support changed my shebang line in dispatch.fcgi from #!/usr/bin/ruby to #!/usr/bin/ruby1.8 and all is well!


I just posted in the Programming forum with the same problem on Rhod. I’ll ask them to change my shebang too and see if it works.