Whenever Gem Fails to Run “bundle exec” Correctly in Capistrano

ⅰ亾dé卋堺 提交于 2019-12-06 03:40:39

It turns out there were a couple problems, both of which needed addressing:

  • Whenever ~> 0.8 introduced a bug with Capistrano roles
  • The Whenever cap task was firing before bundle:install (this is confirmed in your code above)

See issues here: https://github.com/javan/whenever/issues/275 and here: https://github.com/javan/whenever/issues/269

To fix the problem, you most likely need to

  • Update bundler on your server (-v 1.2.3)
  • Update bundler locally
  • Update to the newest Whenever (-v 0.8.2)

@ideaoforder's answer helped me too, previously though I had the same trouble caused by require 'whenever/capistrano' being on the top of the config/deploy.rb followed by require 'bundler/capistrano'. Swapping those two helped.

I have require 'bundler/capistrano' always on top of the deploy script as a rule.

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