RVM and Cron

Recently I found myself having to execute a cronjob using specific rubies and gemsets contained within RVM. The following snippet is what I used as a solution:

@hourly bash -l -c 'rvm use rbx@gemset && rake cron'

The -l forces bash to act as if it had been invoked as a login shell. The -c tells it to read the string that follows.

My name is Hector Castro and I live in Philadelphia, PA. You can see some of my public projects on GitHub, and if you're old-fashioned here is my resume.

You can get in contact with me via Twitter or E-mail.