【发布时间】:2014-11-16 08:45:47
【问题描述】:
我已使用 Capistrano 3 将我的 Rails 应用程序部署到 VPS(Nginx + Unicorn + Postgres),但出现错误页面“我们很抱歉,但出了点问题”。而且我找不到我的 Rails 日志文件,我在 deploy.rb 中取消了对这一行的注释,仍然找不到。
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
在我的当前/log 目录和 shared/log/ 中有日志文件,但是当我刷新我的错误页面时它们没有得到更新。
有什么想法吗?
谢谢
【问题讨论】:
-
你的 unicorn.rb 文件中有
stderr_path "#{root}/shared/log/unicorn.log"和stdout_path "#{root}/shared/log/unicorn.log"吗? -
是的,root = "/var/www/projectx/current" stderr_path "#{root}/log/unicorn.log" stdout_path "#{root}/log/unicorn.log"跨度>
-
而
tail -n 100 /var/www/projectx/current/log/unicorn.log什么也不返回? -
我的当前/日志目录中没有 unicorn.log 文件。仅(development.log newrelic_agent.log staging.log)
标签: ruby-on-rails vps