public
Last active — forked from wayneeseguin/0_notes.txt

rvmrc + bundler

  • Download Gist
0_notes.txt
1 2 3 4 5 6 7 8 9 10 11
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).
 
You can generate the .rvmrc file below by running:
 
rvm --create --rvmrc use 1.9.2
1_.rvmrc
1 2 3 4 5 6 7 8 9 10
# Project specific .rvmrc file
if [[ -s "/Users/wayne/.rvm/environments/ruby-1.9.2-preview3" ]] ; then
. "/Users/wayne/.rvm/environments/ruby-1.9.2-preview3"
else
rvm --create use "ruby-1.9.2-preview3"
fi
 
[[ -s "project_name.gems" ]] && rvm gemset import project_name.gems
 
bundle install
2_Gemfile
1 2
gem "haml"
gem "compass"
3_project_name.gems
1
bundler -v0.9.26

I'm not sure why it took so long to for me to find this command 'rvm --create --rvmrc use 1.9.2' ... but thank you!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.