I configured several different operating systems to work with a couple of CRON flavors and RVM.
I first tried RVM's official solution to the problem but didn't work under FreeBSD and Gentoo. I had to manually add all relevant paths as showed bellow but first type crontab -e
in order to launch the crontab editor[1]:
# atmat's crontab configuration
SHELL=/bin/bash
PATH=/home/atma/.rvm/gems/ruby-1.9.3-p0/bin:/home/atma/.rvm/gems/ruby-1.9.3-p0@global/bin:/home/atma/.rvm/rubies/ruby-1.9.3-p0/bin:/home/atma/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.5.3
RUBYLIB=/home/atma/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1
GEM_HOME='/home/atma/.rvm/gems/ruby-1.9.3-p0'
GEM_PATH='/home/atma/.rvm/gems/ruby-1.9.3-p0:/home/atma/.rvm/gems/ruby-1.9.3-p0@global'
RUBYOPT=rubygems
%nightly,mail(no) * 8-9 /home/atma/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /usr/local/bin/morula -s username update
The above example is working under Gentoo GNU/Linux using fcron a more flexible, beautiful and powerful solution to standard cron, but will work with any cron.
[1] This command will open crontab
with your default system editor.