Skip to content

Instantly share code, notes, and snippets.

View jerzygangi's full-sized avatar

JJ Gangi jerzygangi

View GitHub Profile
@jerzygangi
jerzygangi / launchd_with_rvm
Created October 29, 2013 16:52
The beginning of a script that will be called by launchd (similar to cron on OS X). Currently, type rvm | head -1 is not returning the expected value. If I try and run a ruby file from here, it is not using the rvm ruby.
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"