Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Forked from wayneeseguin/0_notes.txt
Created June 15, 2010 16:33
Show Gist options
  • Save jwreagor/439337 to your computer and use it in GitHub Desktop.
Save jwreagor/439337 to your computer and use it in GitHub Desktop.
This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
# Project specific .rvmrc file
if [[ -s "/Users/wayne/.rvm/environments/system" ]] ; then
. "/Users/wayne/.rvm/environments/system"
else
rvm --create use "system"
fi
[[ -s "project_name.gems" ]] && rvm gemset import project_name.gems
bundle install
gem "haml"
gem "compass"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment