繁体   English   中英

Unicorn不在生产模式下运行

[英]Unicorn doesn't run in production mode

我正在运行stack nginx + unicorn + rails 3.2

当我跑步的时候

bundle exec unicorn_rails -c config/unicorn.rb -E development

没关系,网站运行良好

当我尝试在生产模式下启动独角兽网站时

bundle exec unicorn_rails -c config/unicorn.rb -E production

我有“我们很抱歉,但出了点问题。” 错误:

在此输入图像描述

您是否为生产运行迁移?

rake db:migrate RAILS_ENV="production"

问题可能不是Unicorn。

只需在config / production.rb中添加config.log_level = :debug

你会得到日志/ production.log错误日志粘贴该日志的输出,所以我可以帮助你

也尝试rake assets:precompile

问题出现在脚本预编译中。 通过在以下行添加“config / environments / production.rb”解决了这个问题:

config.assets.compile = true

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM