[英]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.