On Wed, Feb 15, 2012 at 3:58 AM, Paul Gideon Dann <pdgiddie@xxxxxxxxx> wrote: > On Tuesday 14 Feb 2012 01:53:01 Peter Lewis wrote: >> I think it's worth separating out the "user" and the "admin" in this >> argument. To install a gem system-wide, you have to do something like "sudo >> gem install XXX", right? This is almost always a bad idea, IMO, and people >> hopefully won't do it at least during the normal run of working with ruby. >> Personally, I don't let gem mess with anything outside my home directory. > > I'm worried. I use "sudo gem install" to install gems system-wide. It's not > practical to use Arch packages for this instead, because I can't rely on a > given gem always being packaged for Arch. I also don't really see the point > of packaging a package from another packaging system which already happily co- > exists with pacman. I have no issue using gem to administer system gems, > since they always stay in /usr/lib/ruby and don't interfere with the rest of > the system (except for /usr/bin, admittedly). > Some people choose to use pacman packaged gems because it handles deps better and patches could get included to fix some issues. I will only be implementing the changes in the planned layout only this cleanup. That means I wont be moving system-wide installation to /var/.. yet Don't worry, I wont forget about users that use gem to install to system wide locations. As already mentioned, I will make the default gem install to $HOME/.gem/ruby and if you so choose, you can edit your gemrc to install to the system wide location (/usr/lib.. for now). > Can you clarify if you're planning to make it impossible to use gem to install > system gems? I *really* want to avoid using pacman for system gems and gem > elsewhere. It makes no sense to me. I'd rather use gem for all gems. > I wont be forcing anyone to use pacman instead of gems, now or in the future. > Maybe a quick summary of the plans so far? > > Paul Summary of the changes in this cleanup: /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