Skip to content

Instantly share code, notes, and snippets.

@Spaceghost
Created December 21, 2011 03:09
Show Gist options
  • Save Spaceghost/1504360 to your computer and use it in GitHub Desktop.
Save Spaceghost/1504360 to your computer and use it in GitHub Desktop.
My rvmrc file
#!/usr/bin/env bash
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
environment_id="ruby-1.9.3-p0@wafflehunter"
#
# First we attempt to load the desired environment directly from the environment
# file, this is very fast and efficicent compared to running through the entire
# CLI and selector. If you want feedback on which environment was used then
# insert the word 'use' after --create as this triggers verbose mode.
#
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
else
# If the environment file has not yet been created, use the RVM CLI to select.
rvm --create use "$environment_id"
fi
# Ensure that Bundler is installed, install it if it is not.
if ! command -v bundle >/dev/null; then
printf "Installing bundler.\n"
gem install bundler -v 1.0.18
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment