Thursday, March 23, 2006

More Rails 'Premature end of script headers: dispatch.fcgi' errors...

This is a real killer that has bitten me now two times. The first time I wrote about earlier was caused by Firefox's inaccurate session handling. The second time was just as confusing. The presentation was identical--no log messages except for: ==> /home/deploy/logs/access_log <== XX.X.XX.XX - - [24/Mar/2006:01:23:07 -0500] "GET / HTTP/1.1" 500 68 ==> /home/deploy/logs/error_log <== [Fri Mar 24 01:23:07 2006] [error] [client XX.X.XX.XX] Premature end of script headers: dispatch.cgi The system ran fine in WEBrick and in console mode (in both development and production modes); however, dispatch.fcgi continued to err. I also switched to dispatch.cgi (non FastCGI process) and saw the same errors. What was the problem?
Well--I deploy my projects through Switchtower (which is now Capstrano). I had diligently updated my local and staging servers to Capistrano, but on the deployment server I was still running the Switchtower gem. I remembered to check this--saw it was out of date--and after a 'gem install capistrano' all was well.

0 comments: