Help getting rails application working on fastcgi


I’ve previously had a rails application up and running on dreamhost using fastcgi, however have just recently performed a “cap deploy” but have had problems:

  • I get a long wait period after browsing to the application and finially it returns “Application Error - Rails application failed to start properly”
  • No entries in the rails production (or development) logs
  • No fastcgi.crash.log entries
  • In the /log/http error.log I see "FastCGI: incomplete headers (0 bytes) received from server "
  • If I run dispatch.rb
    [skybar]$ ruby dispatch.rb
    ./…/config/environment.rb:3: uninitialized constant RAILS_ROOT (NameError)
    from dispatch.rb:4:in `require’
    from dispatch.rb:4

Can anyone help with some fault finding tips re how to track down whats going wrong?

Note that I have made sure:

  • log/temp & dispatch.fcgi are writeable
  • have issued “killall -9 ruby”
  • etc

Thanks in advance

PS. I did not that in ~/logs//http/error.log there are the follow 2 entries that show up after a timeout period of the browser not returning correctly:

  • FastCGI: comm with (dynamic) server “/public/dispatch.fcgi” aborted: (first read) idle timeout (120 sec)

  • FastCGI: incomplete headers (0 bytes) received from server " /public/dispatch.fcgi"

Does this help? Anyone know how to fix this?