The crontab -l below doesn\'t seem to run. The script run by hand runs fine. Here is the error i\'m seeing
Dec 3 20:12:01 dahlia /USR/SBIN/CRON[13912]: (gigawat
This is quite old but thought I'd comment anyway. RVM creates a wrapper for each version of ruby you install.
run this command replace 2.5.1 with your ruby version
rvm env --path 2.5.1
this gives you the path to the environment mine is
/home/username/.rvm/environments/2.5.1
you want just the rvm path
/home/username/.rvm/
take a look at the wrappers directory there should be a wrapper for each version and gemset you have installed. Test your script with the wrapper
/home/username/.rvm/wrappers/ruby-2.5.1/ruby /home/username/scripts/script.rb
or if you have a specific gemset
/home/username/.rvm/wrappers/ruby-2.5.1@gemset/ruby /home/username/scripts/script.rb
Use this command directly in your crontab
* * * * * /home/username/.rvm/wrappers/ruby-2.5.1/ruby /home/username/scripts/script.rb