Rails 3 无法访问服务器上的日志文件 [英] Rails 3 Unable to access log file on server
问题描述
我正在将我的 Web 应用程序部署到我的服务器,一切正常,但我无法找到摆脱以下错误消息的方法.在部署之前,我的日志中有一个 development 和 production.rb 文件,但是当推送到服务器时,那里什么也没有,我无法创建它.我已经寻找了其他解决方案,但到目前为止没有任何效果,我该如何解决这个错误?
I am deploying my web application to my server and everything works perfectly except I cannot find a way to get rid of the following error message below. Before deploying I have a development, and production.rb file in my log but when pushing to the server there is nothing there and I cannot create it. I have looked for other solutions but so far nothing has worked, How can I solve this error?
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.
推荐答案
正如该错误消息所述,日志记录进程无法访问日志文件.这可能是由于 /var/www/websites/public/appname/releases/20120608236602/log
上的权限所致.
As that error message states, the logging process cannot access the log file. This would be due to the permissions on /var/www/websites/public/appname/releases/20120608236602/log
.
您可以使用以下命令更改该目录的权限:
You can change the permissions on that dir with:
chmod -R 0666 /var/www/websites/public/appname/releases/20120608236602/log
这篇关于Rails 3 无法访问服务器上的日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!