Gemset? Why should I compartamentalize my ruby dependencies if I am already using a Bundler? Isn’t that redundant? Yes, you are correct.
Recently, I have been configuring a Jenkins server to run our builds at work. We run a number of rails projects on the same ubuntu box, some on ruby 1.8.7 and some on 1.9.3. We run RVM and create a gemset for each project. RVM causes a number of issues when you are running bash scripts (jenkins runs each build using a shell script). Instead of whining about RVM, I much prefer to walk you through the process of replacing it with rbenv.
With proper bundler user, gemsets are unnessecary. Instead, define the gems required for a project in the project’s Gemfile. Then, run bundle install. rbenv is easily configured(see below!) to install gems to a projects’ vendor directory instead the default system gems.
Each application will be confined to only using gems defined in its Gemfile. However, please remember to refrain from installing gems with the
gem install, except for global gems. The only gem that you should install manually is Bundler.
gem uninstall rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
brew install rbenv
brew install ruby-build
rbenv install 1.9.3-p327
rbenv install 2.0.0-preview2
if [ -f ~/.bashrc ]; then
Special thanks to Harry Marr for his directions that inspired this post.