Missing required gems when execute cron created by whenever gem in production environment

戏子无情 提交于 2019-12-06 07:19:56

Make sure your RVM defaults to the correct ruby version where the gems are. Then try to use bundle exec rake ... by doing so it will explicitly invoke whatever the gems in the bundle (assuming you are using RVM)

I have similar problem and I fix with

rvm cron setup

in server. This add rvm env variables (PATH, GEM_HOME,GEM_PATH...) to my cronjob.

I have to delete the set command

env :PATH, ENV['PATH']

modifying PATH is not enough, check rvm help cron - there are few options that will help manage rvm in crontab.

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