Only with cron: /usr/bin/env: ruby_executable_hooks: No such file or directory

后端 未结 3 835
粉色の甜心
粉色の甜心 2021-01-06 18:01

I have a perl script that uses system() to call a shell command, which uses ruby_executable_hooks.

When I run this script from the command line it executes flawlessl

3条回答
  •  一生所求
    2021-01-06 18:29

    I'm not quite sure why this works but if anyone is using RVM on MacOS this worked for me. I am running database backups using a gem called backup. I had to put the gem inside my app's Gemfile. Not sure why I have to cd to the app directory.

    * * * * * source /Users/john/.rvm/environments/ruby-2.7.1; cd /path/to/app && bundle exec backup perform -t mybackup

提交回复
热议问题