Setup GEM_HOME for your ruby gems installation in Ubuntu

I found this setup is pretty helpful when working with Rails projects in Ubuntu (it's 14.04 in this case):

Add these lines at the end of ~/.bashrc:

export GEM_HOME=$HOME/ruby/gems
export GEM_PATH=$GEM_HOME:/lib/ruby/gems/1.9.3
export GEM_CACHE=$GEM_HOME/cache
export PATH=$PATH:$HOME/ruby/gems/bin

To get affected right away:

$ source ~/.bashrc

Comments