【发布时间】:2012-06-09 01:14:36
【问题描述】:
我正在将我的 Web 应用程序部署到我的服务器上,并且一切正常,除了我找不到摆脱以下错误消息的方法。在部署之前,我的日志中有一个 development 和 production.rb 文件,但是当推送到服务器时,那里什么都没有,我无法创建它。我一直在寻找其他解决方案,但到目前为止没有任何效果,我该如何解决这个错误?
Rails Error: Unable to access log file. Please ensure that
/var/www/websites/public/appname/releases/20120608236602/log/production.log
exists and is chmod 0666. The log level has been raised to WARN and
the output directed to STDERR until the problem is fixed.
【问题讨论】:
-
你是如何部署你的应用程序的?
-
@cheeseweasel 我正在使用 capistrano 进行部署
-
我相信默认情况下,Capistrano 应该将你的日志文件夹设置在 appname/shared 文件夹中,releases/xxx/log 应该是符号链接,是这样吗?
-
我认为真正的原因是bradhe.wordpress.com/2011/06/26/a-sneaky-rails-3-bug-in-logging 检查您的
config.log_level是否设置为正确的符号。
标签: ruby-on-rails ruby ruby-on-rails-3 production-environment