Rails cron whenever, bundle: command not found

后端 未结 13 1578
星月不相逢
星月不相逢 2020-12-04 17:57

I am trying to use whenever to execute a rake task onces a day. Im getting this error

/bin/bash: bundle: command not found
/home/app/.rvm/rubies/ruby-1.9.2-p         


        
13条回答
  •  天涯浪人
    2020-12-04 18:28

    I hate this problem - I've spent hours trying to solve it too.

    What works for me is to add

    RAILS_ENV=production; source /usr/local/rvm/scripts/rvm;
    

    before the bundle command.

提交回复
热议问题