I'm trying to install my rails app on a shared hosting webserver. I've
compiled my own ruby, then installed gem and the mysql, fcgi and rails
gems. The website is being served by apache and fcgi. When I try to
load my web page, I've got the following error :
Application error
Rails application failed to start properly
How do I know what's wrong ? Where are the logs ? (the .log files in
myapp/logs are empty).
Perhaps the Apache logs can shed some light on the problem.
What does you .htaccess file look like? Do dispatch.rb and
dispatch.fcgi have the correct path to ruby on the first line? Are the
permissions correct for your RAILS_ROOT/log directory? Your log
directories are empty and this could indicate that the user that you're
running apache under does not have write access to your apps log
directory.
checkout stuff on http://www.hostingrails.com/forums covers pretty much
everything about ror+apache + fcgi
I think it most likely has to do with folder permissions and or shebang
lines in files as dispatch*
look for those topics in the link above.
I’ve found that if your app takes a while to crash/come back with an
error and you can’t see anything in the Rails’ logs, the problem is
[nearly without fail] in environment.rb or boot.rb in the config
directory. If you’ve edited the files in Windows, do your self a favor
and run dos2unix on the files. Seriously, just give it a try. If that
doesn’t solve things you can sometimes get a more detailed view of
what’s wrong by loading the console [script/console] or booting up an
instance of webrick [script/server]. Those will crash to STDERR/STDOUT
and you’ll be able to see better what’s going on.
If it’s crashing almost immediately, then the problem should
be in the logs. Also, don’t forget to restart the dispatchers when you
change your code. That can cause some unnecessary heartache as well.