This gave me a headache for a couple hours, so once again, my pain is your gain. If you’re using RVM and running cron jobs that are ruby scripts, you must remember that:
unlike system ruby, cron jobs don’t run .bashrc so rvm is not loaded
That means when you tell it to run ruby, cron has no idea where ruby is, and just fails silently. So how do you tell it to load ruby through rvm? Well, you load bash and tell it to run something:
04 * * * * /bin/bash -l -c 'cd /absolute/path/to/my/script && ruby myscript.rb'
Notice that you can set environment variables in the cron file above your scheduled scripts. Also, in your script, make sure you’re not writing things to stdout using puts(). That’ll give you Broken Pipe errors when you’re running your cron job.