-
-
Save MasterLambaster/444644 to your computer and use it in GitHub Desktop.
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
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 |
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
# Project specific .rvmrc file | |
#Full ruby version to use | |
ruby_version="ruby-1.8.7-p249" | |
#Project name, used to get gems list by project name | |
project="rvmtest" | |
#Gemset name specific for project, can be empty. Should start wit @(<at>) | |
gemset="@$project" | |
if [[ -s "$HOME/.rvm/environments/$ruby_version$gemset" ]] ; then | |
source "$HOME/.rvm/environments/$ruby_version$gemset" | |
else | |
rvm --create use "$ruby_version$gemset" | |
[[ -s "$project.gems" ]] && rvm gemset import "$project.gems" | |
bundle install | |
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
gem "haml" | |
gem "compass" |
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
bundler -v0.9.26 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment