Sunday, February 6, 2011

crontab doesn't work with ruby rvm

I am using RVM ruby, and crontab doesn't work properly.

crontab doesn't look at .bashrc or .bash_profile. Therefore, we have to add this into

sudo vi /etc/profile. Just source whatever in profile.

luan@luan-laptop:/etc$ head profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

# luan added here

source /home/luan/.bash_profile

# end luan added

if [ -d /etc/profile.d ]; then