Skip to content

Instantly share code, notes, and snippets.

@umuro
Created August 21, 2012 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umuro/3414825 to your computer and use it in GitHub Desktop.
Save umuro/3414825 to your computer and use it in GitHub Desktop.
If your old rvmrc is not ensuring a bundle then you can add this bit...
#This bit goes at the end of rvmrc and makes sure that bundle is installed and it installs gems
#If you use bundler, this might be useful to you:
if [[ -s Gemfile ]] && {
! builtin command -v bundle >/dev/null ||
builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
}
then
printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
gem install bundler
fi
if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
then
bundle install | grep -vE '^Using|Your bundle is complete'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment