Knowledgebase: Ruby On Rails
Rails Error
Posted by - NA - on 30 August 2005 06:09 PM

When you get an error stating 'Rails application failed to start properly' it means there was a critical failure somewhere in your Rails application. Information about this error can be found in one of two places:

  • Error Log section of your control panel

  • 'RAILS_APP/log/' (the log directory for your Rails application)

Usually there is more useful information in the Rails log directory than in the error logs section of your control panel. There are several files in there depending on the mode you are in. If you're using the FastCGI wrapper, you'll want the fastcgi.crash.log. If you're using the regular CGI, it's one of the other logs, depending on the mode you're in.

Common errors include incorrect database settings or bugs in your code.

It's recommended that you use the regular CGI for the application, rather than FastCGI, during development. FastCGI often takes some time to show the error page when something fails, so the CGI can give you faster responses to your code changes. However, if you run your app through CGI (rather than FCGI), Rails has to restart on every request which can really increase your load times. FastCGI doesn't restart Rails every time a page is loaded. But if you make changes to your code while running on FastCGI they won't take effect until after Rails has been restarted.

(2252 vote(s))
This article was helpful
This article was not helpful

Comments (2)
bruno bornsztein
09 January 2006 03:29 PM
Just remember that if you run your app through CGI (rather than FCGI) Rails has to restart on every request, and that can dramatically increase your load times. FCGI, on the other hand, is persistent, meaning it doesn't restart Rails everytime a page is loaded. The downside is that if you make changes to your code while running on FCGI, they won't take effect until after Rails has been restarted, which doesn't happen immediately.

In general, you should try to do your development work on your local machine, and only push your code out onto the shared server once you're sure it works. Otherwise you'll be taking up resources from all the other people on the server.
Matt Donovan
12 January 2007 02:30 AM
I had the same problem. The text for that message is in .htaccess the Apache related file if you're wondering where it comes from. I believe any serious (e.g. 500 type error) will generate that message, but in my case, it was due to a 'puts' being in my code...I was testing the ability to write and/or redirect stdout within the webserver, and accidentally left one 'puts' in my code when I shipped it to Apache. There was no problem when it ran in the WEBrick environment (meaning that it just ignored that line and continued to function) but in Apache it caused the 'Rails application failed to start properly' error.
Post a new comment
Full Name:
Help Desk Software by Kayako fusion