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
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