Setting path for whenever in cron so it can find ruby

后端 未结 3 1891
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 03:07

My ruby is in /usr/local/bin. whenever can\'t find it, and setting PATH at the top of my cron file doesn\'t work either, I think because whenever is running the command insi

3条回答
  •  清歌不尽
    2020-12-14 03:11

    The solution is to put this in schedule.rb:

    env :PATH, ENV['PATH']
    

    Here's a little guide I put together on the topic.

提交回复
热议问题