Running 'sudo gem list --local
' and 'gem list --local
' give me differing results. My gem path is set to my home folder and only contains the gems from 'gem list --local
'.
It's probably not good to have gems installed in different directories on my computer, so should I have the gem path set differently, and should I always use sudo
when installing something?
my ~/.profile
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
~/.bash_profile is empty.
You can also install gems in your local environment (without
sudo
) withI recommend that so you don't mess with your system-level configuration even if it's a single-user computer.
You can check where the gems go by looking at gempaths with
gem environment
. In my case it's "~/.gem/ruby/1.8".If you need some binaries from local installs added to your path, you can add something to your bashrc like:
(from http://guides.rubygems.org/faqs/#user-install)