why #!/usr/bin/env ruby doesn't work in crontab?

后端 未结 3 2065
半阙折子戏
半阙折子戏 2021-01-12 03:40

I have install ruby by rvm (system-wide), and worked correctly via normal console and my rails program is behaving correctly with both rails runner and ap

3条回答
  •  忘掉有多难
    2021-01-12 04:33

    your cron isn't inheriting your environment. try echoing "$PATH" to a file to see what it's set to.

    You could also just do "PATH=/usr/bin/ruby && foo.rb"

提交回复
热议问题