Skip to content

Instantly share code, notes, and snippets.

@brandonaaskov
Created September 24, 2014 20:45
Show Gist options
  • Save brandonaaskov/19777359aed426ca4c7b to your computer and use it in GitHub Desktop.
Save brandonaaskov/19777359aed426ca4c7b to your computer and use it in GitHub Desktop.
.rvmrc file to be used with Fullscreen's Angular/Rails projects
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment