You should never have to use 'sudo gem install', but the trick to doing that is to add the following to your .bash_profile:
https://gist.github.com/217895
export GEM_PATH="$HOME/.gem/ruby/1.8" export GEM_HOME="$HOME/.gem/ruby/1.8" export PATH="$HOME/.gem/ruby/1.8/bin:$PATH"