-
-
Save aharpole/d1194e08cec010375bb3 to your computer and use it in GitHub Desktop.
Everything you need to use RVM sanely. Check out the instructions in the rvm-setup file to get started.
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
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
fi |
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
foo |
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
if [ -f "$rvm_path/scripts/rvm" ]; then | |
source "$rvm_path/scripts/rvm" | |
VERSION_FROM_GEMFILE=$(perl -ne '/^ruby .([0-9\.]+).$/ && print "$1"' Gemfile) | |
if [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` | |
fi | |
if [[ -n $VERSION_FROM_GEMFILE ]]; then | |
rvm use $VERSION_FROM_GEMFILE | |
fi | |
if [ -f ".ruby-gemset" ]; then | |
rvm gemset use --create `cat .ruby-gemset` | |
fi | |
fi |
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
#!/usr/bin/env bash | |
# save this in /usr/local/bin by running the following: | |
# $ curl -o /user/local/bin/rvm-setup https://gist.githubusercontent.com/aharpole/d1194e08cec010375bb3/raw/596bf4d9803bfa072bb598db142fca27d7276cd3/rvm-setup | |
# $ chmod +x /usr/local/bin/rvm-setup | |
echo "${PWD##*/}" > .ruby-gemset | |
curl -o .rvmrc https://gist.githubusercontent.com/aharpole/d1194e08cec010375bb3/raw/4cc47262d16a777a6f087906f810110168b9164c/.rvmrc | |
VERSION_FROM_GEMFILE=$(perl -ne '/^ruby .([0-9\.]+).$/ && print "$1"' Gemfile) | |
if [[ -n $VERSION_FROM_GEMFILE ]]; then | |
echo "$VERSION_FROM_GEMFILE" .ruby-version | |
else | |
echo "2.3.0" > .ruby-version | |
fi | |
curl -o .powrc https://gist.githubusercontent.com/aharpole/d1194e08cec010375bb3/raw/4273909fcaf9ed7827f827b5cf8fc2d4c0465bbd/.powrc | |
cd . |
Just run rvm-setup
then type cd .
. You'll be prompted to trust the .rvmrc file; just type "yes" and hit Enter. Boom. Done.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install this to your shell: