Rails unable to start

A couple of weeks ago I settled up a rails web app. All was running well.

'till the users reported a problem …

  1. Effectively, jumping to the URL resulted in a cryptic error msg :

Application error
Rails application failed to start properly"

  1. Trying to run the dispatch.fcgi file manually from the shell and resulted in this error:

./public/…/config/environment.rb:54: uninitialized constant ActionMailer (NameError)
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:41:in run' from ./public/../config/environment.rb:12 from public/dispatch.fcgi:21:inrequire’
from public/dispatch.fcgi:21

  1. Still another test :
    $ ./script/console
    Loading development environment.
    ./script/…/config/…/config/environment.rb:54:NameError: uninitialized constant ActionMailer
    /usr/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/action_controller/assertions/selector_assertions.rb:525:NoMethodError: undefined method camelize' for "top":String /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’: no such file to load – rcss (LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require' from ./script/../config/../config/../app/controllers/application.rb:1 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require' from /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/console_with_helpers.rb:17 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:ingem_original_require’
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in require' from /usr/lib/ruby/1.8/irb/init.rb:252:inload_modules’
    from /usr/lib/ruby/1.8/irb/init.rb:250:in each' from /usr/lib/ruby/1.8/irb/init.rb:250:inload_modules’
    from /usr/lib/ruby/1.8/irb/init.rb:21:in setup' from /usr/lib/ruby/1.8/irb.rb:54:instart’
    from /usr/bin/irb:13

  2. I’m definitely not a rails master and will never be …

Can anyone help me find a way to restore this damned application with these 4 pieces of info … ?

Mayday Mayday MAYDAY !!!


Were you able to resolve your problem? I too am having similar problems, although I’ve never been able to get my Rails app running on Dreamhost. Everything works fine in development on my home machine, but after following the instructions on the Dreamhost wiki very carefully, I am still unable to get my app working… here are some more details:

  1. I’ve tried installing on a subdomain mysub.mydomain.com, and also on top level domain mydomain.com. In both cases, I turned FastCGI on in the Dreamhost panel, and mapped my web directory to the public directory.

  2. Trying to access the app from the web produces no errors in the rails /log directory, however I do see the following errors in my ~/logs/mydomain.com/http/error.log:

[Sun May 13 22:56:35 2007] [error] [client] FastCGI: comm with (dynamic) server “/home/username/mydomain.com/public/dispatch.fcgi” aborted: (first read) idle timeout (60 sec)
[Sun May 13 22:56:35 2007] [error] [client] FastCGI: incomplete headers (0 bytes) received from server “/home/username/mydomain.com/public/dispatch.fcgi”

3)If I do ruby public/dispatch.fcgi from the command line, I get the following errors in fastcgi.crash.log:

[13/May/2007:23:07:00 :: 23176] starting
[13/May/2007:23:07:00 :: 23176] Dispatcher failed to catch: private method split' called for nil:NilClass (NoMethodError) /usr/lib/ruby/1.8/cgi.rb:897:inparse’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/cgi_ext/raw_post_data_fix.rb:45:in initialize_query' /usr/lib/ruby/1.8/cgi.rb:2274:ininitialize’
/usr/lib/ruby/1.8/fcgi.rb:594:in new' /usr/lib/ruby/1.8/fcgi.rb:594:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:141:in process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:55:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:25:in process!' ./dispatch.fcgi:26 almost killed by this error [13/May/2007:23:07:00 :: 23176] Dispatcher failed to catch: private methodsplit’ called for nil:NilClass (NoMethodError)
/usr/lib/ruby/1.8/cgi.rb:897:in parse' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/cgi_ext/raw_post_data_fix.rb:45:ininitialize_query’
/usr/lib/ruby/1.8/cgi.rb:2274:in initialize' /usr/lib/ruby/1.8/fcgi.rb:594:innew’
/usr/lib/ruby/1.8/fcgi.rb:594:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:141:inprocess_each_request!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:55:in process!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:25:inprocess!’
killed by this error

I’ve tried all the troubleshooting I can find on Dreamhost’s wiki and from google searches, and yet I still can’t get this thing to run. I’m all out of ideas. Anybody else have any suggestions?