Skip to content

Instantly share code, notes, and snippets.

@jerzygangi
Created October 29, 2013 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerzygangi/7218433 to your computer and use it in GitHub Desktop.
Save jerzygangi/7218433 to your computer and use it in GitHub Desktop.
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"
else
printf "ERROR: An RVM installation was not found.\n"
fi
type rvm | head -1 > /Users/jerzy/Desktop/loga; #File is empty; I believe it should say "rvm is a function"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment