Created
June 6, 2013 15:22
-
-
Save nicolas-brousse/5722365 to your computer and use it in GitHub Desktop.
Pow RC file for use rvm with .ruby-version and .ruby-gemset files
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
| #!/usr/bin/env bash | |
| if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| ruby_version=`cat .ruby-version` | |
| ruby_gemset=`cat .ruby-gemset` | |
| environment_id="$ruby_version@$ruby_gemset" | |
| rvm use "$environment_id" || { | |
| echo "Failed to open RVM environment '${environment_id}'." | |
| return 1 | |
| } | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment