Skip to content

Instantly share code, notes, and snippets.

@jasherai
Created June 21, 2010 15:29
Show Gist options
  • Select an option

  • Save jasherai/447020 to your computer and use it in GitHub Desktop.

Select an option

Save jasherai/447020 to your computer and use it in GitHub Desktop.
ruby_ver=ruby-1.8.7-p249
gemset_name=vagrant
## The rest is auto...
cur_dir=$(basename $(pwd))
rvm --create use ${ruby_ver}@${gemset_name:-cur_dir} > /dev/null
[[ ! -z ${rvm_gemset_name} ]] && {
[[ -s "${rvm_gemset_name}.gems" ]] && {
echo "Importing gemset gems from file : [${rvm_gemset_name}.gems]"
rvm gemset import ${rvm_gemset_name}.gems
}
}
[ "$(which bundle)" == "" ] && { gem install bundle; }
bundle check || bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment