Created
August 24, 2011 02:52
-
-
Save tpope/1167200 to your computer and use it in GitHub Desktop.
Use .rbenv-version with RVM
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
| # ~/.rvm/hooks/after_cd | |
| local dir="$PWD" | |
| while [ "$(dirname "$dir")" != "$dir" ]; do | |
| if [ -f "$dir/.rbenv-version" ]; then | |
| rvm use "$(cat "$dir/.rbenv-version")" | |
| break | |
| fi | |
| dir="$(dirname "$dir")" | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why? So I can set the version without putting up with the crap that SOME people like to put in .rvmrcs.