I get the following error when restarting my rails app. I\'ve had this problem before, on another server with another app, but can\'t remember what the problem was, or how I
It turned out to be a subtle rails bug:
When an exception is raised in these two lines
logger = ActiveSupport::BufferedLogger.new(configuration.log_path)
logger.level = ActiveSupport::BufferedLogger.const_get(configuration.log_level.to_s.upcase)
rails assumes it can't find the log file. However, the actual error occurred in the second line: a NameError because the constant is incorrect. The reason is that there was a legacy log level in my configuration file:
config.log_level = Logger::INFO
Rails 2.2 uses its own logger, and doesn't understand the above line.
Solution: remove line, or use:
config.log_level = :info
Is Rails running as me
? If not, what user is it running as? Is that user jail
'ed? Does the user have traverse permissions for all components of /apps/staging/shared/log
as well as all components of /apps/staging/releases/20090310162127/log
?