Last active
August 29, 2015 14:04
-
-
Save jdee/e81170da4f86dbbc61cd to your computer and use it in GitHub Desktop.
failing script without rvm use default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: http://beginrescueend.com/workflow/scripting/ | |
# 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 | |
export RAILS_ENV=production | |
cd $APP_PATH | |
rvm use default # <= fails without this | |
bundle exec rake do_something |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment