Unicorn restart issue with capistrano

自闭症网瘾萝莉.ら 提交于 2019-12-02 20:55:16
Patrick Tescher

You should set the BUNDLE_GEMFILE environment variable before you start the server, point it at current/Gemfile.

In your unicorn.rb add the before_exec block

current_path = "/var/www/html/my project/current"

before_exec do |server|
  ENV['BUNDLE_GEMFILE'] = "#{current_path}/Gemfile"
end

Read more about it here http://blog.willj.net/2011/08/02/fixing-the-gemfile-not-found-bundlergemfilenotfound-error/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!