Created
August 5, 2016 20:14
-
-
Save jCrip/c8a73f3fd4a563cd36f631a17e55cbb8 to your computer and use it in GitHub Desktop.
Pow RVM Integration
This file contains 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
# detect `$rvm_path` | |
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ] | |
then rvm_path="${HOME:-}/.rvm" | |
fi | |
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ] | |
then rvm_path="/usr/local/rvm" | |
fi | |
# load environment of current project ruby | |
if | |
[ -n "${rvm_path:-}" ] && | |
[ -x "${rvm_path:-}/bin/rvm" ] && | |
rvm_project_environment=`"${rvm_path:-}/bin/rvm" . do rvm env --path 2>/dev/null` && | |
[ -n "${rvm_project_environment:-}" ] && | |
[ -s "${rvm_project_environment:-}" ] | |
then | |
echo "RVM loading: ${rvm_project_environment:-}" | |
\. "${rvm_project_environment:-}" | |
else | |
echo "RVM project not found at: $PWD" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment