FastCGI and Rails

FastCGI and Rails

Posted by: telos
Posted on: 2005-12-12 06:38:00

I have been trying to set up my rails app on Dreamhost for a while now.

I've made sure all my dispatch.* files and the public directories are chmod 755, I have set the ENV['RAILS_ENV'] ||= 'production' in environment.rb, I have changed the .htaccess to use dispatch.fcgi instead of dispatch.cgi, I have checked that things work using script/console and things work fine using Webrick.

And I still can't get rid of this FastCGI error: FastCGI: incomplete headers (35 bytes) received from server "/path/to/dispatch.fcgi". Running dispatch.fcgi on the command line yields a 500 error. There is nothing in production.log and fastcgi.crash.log says stuff like "starting","asked to terminate immediately","terminated by explicit exit".

Does anyone have any ideas? Please?

Re: FastCGI and Rails

Posted by: GooberDLX
Posted on: 2005-12-12 08:18:00

try running dispatch.rb straight from the command line... see if that is throwing any kind of exception...

DevelopStuff - http://www.developstuff.com

Re: FastCGI and Rails

Posted by: telos
Posted on: 2005-12-12 08:53:00

Doesn't look very promising:

$ ./dispatch.rb
Status: 500 Internal Server Error

Re: FastCGI and Rails

Posted by: dallas
Posted on: 2005-12-13 12:19:00

Make sure it has the proper line-endings. You may need to use dos2unix on it.

- Dallas
- DreamHost Head Honcho/Founder

Re: FastCGI and Rails

Posted by: telos
Posted on: 2005-12-13 13:57:00

Thanks Dallas, but I don't use Windows... no DOS line endings issues there...

Things are a bit different now than before though, as I only get the Application Error intermitently. Sometimes it works, sometimes it doesn't... Weird

Tags: chmod 755fcgidreamhostcrash logserver pathhtaccessterminateheadersincompleteexplicitexit