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
It's almost certainly an issue with your environment variables. When running something from cron your .bashrc
isn't activated, so environment variables that might set up, like which ruby version you are pointed to and what your PATH
looks like are likely different.
How to fix this will depend on your environment and what tools, if any, you might be using to select your ruby version (rvm, chruby, rbenv, etc...).
You might want to use something like which ruby
to figure out exactly what ruby to execute and use that in your crontab.