On Wed, Feb 15, 2012 at 9:06 AM, Paul Gideon Dann <pdgiddie@gmail.com> wrote:
On Wednesday 15 Feb 2012 08:59:10 Thomas Dziedzic wrote:
/usr/lib/ruby/site_ruby - This directory is for user specific installation and should never be touched by the package manager. /usr/lib/ruby/vendor_ruby - ruby packages installed with pacman which aren't gems go here $HOME/.gem/ruby/[ruby_base_version] - default target when running gem install foo because --user-install is now in the gemrc file /etc/gemrc - contains "gem: --user-install" to install user installed gems with gem to $HOME/.gem/gems
If the user chooses to install gems using gem, they will have to add the bin directory to the $PATH: export PATH="$PATH:$(ruby -rubygems -e 'puts Gem.user_dir')/bin".
System wide installation of gems by default will be disabled. If you want system wide gems, either run gem with the --no-user-install flag like "sudo gem install --no-user-install foo" You can also install to the system wide location by removing --user-install from /etc/gemrc
This all sounds mostly fine. I assume that "sudo gem install" will simply install the gem using root-owned files in the home directory, right?
Paul
Correct, by default sudo gem install foo would install to /root/.gem/ruby which isn't system wide. If you really want system wide installs, either run sudo gem with --no-user-install or remove --user-install from /etc/gemrc