Nepal on Rails

millisami's rants!

Replacing Rvm With Rbenv Using Homebrew

RVM was such a great tool to switch between various rubies and gemsets. But from my last update of the rvm using rvm get head, my shell hangs whenever I change the directory.

So, I thought it is the time to move on with rbenv.

First delete the rvm with the following cmd:

rvm implode

Delete the rvm specific code from your ~/.bashrc or ~/.zshrc or whaterever files related to the shell you’re using.

Then install rbenv and rbenv-gemset via homebrew.

brew update
brew install rbenv rbenv-gemset

Creating a global gemset

echo global > ~/.rbenv-gemsets
gem install bundler
cd project
echo "project-gemset global" > .rbenv-gemsets
bundle install

Whenever you create a gemset and want to share some gems like bundler, install the bundler in global gemset as above and add the global gemset along with the project specific gemset in .rbenv-gemsets file as above.