From: Ken Bloom Date: 2007-11-24T00:10:12+09:00 Subject: Re: RubyGems 0.9.5 On Tue, 20 Nov 2007 18:09:18 -0500, Eric Hodel wrote: > On Nov 20, 2007, at 08:18 , Michael Greenly wrote: >> Austin Ziegler wrote: >>> On 11/20/07, M. Edward (Ed) Borasky wrote: >>>> 1. Work with the packages as supplied by your distro. 2. *Don't* >>>> install the packages supplied by your distro -- use upstream >>>> source and put things in /usr/local. >>>> 3. Complain and whine to busy people who will blow you off. :) >>> >>> 4. Complain to your distro manager to be more sensible when it comes >>> to Ruby. Look closely at what Apple did for good suggestions. What Debian is doing is sensible. Your decision to use non-debian methods to upgrade RubyGems (instead of waiting for apt-get to have the new version) is what broke things. This is true of all distributions with package managers. If you upgrade outside the packaging system, it will break things. >> This latest update some how decided to install rubygems to /usr/local >> even though it was previously installed in /usr/lib > > My understanding of the FHS says that you are not allowed to install > software into /usr/lib, only Debian is allowed to do that. So a hand- > installed (even gem update --system) RubyGems must be installed in / > usr/local. > >> and it moved it's gem cache from /var/lib/rubygems to /usr/lib/ >> ruby/gems. Why? This would probably happen if running gem update --system to go from 0.9.4 to 0.9.5 still used the 0.9.4 rules for determining the path. (Does anyone know if this is the case?) An upgrade from 0.9.5 to 0.9.6 would then work correctly. (Subject to the caveat that one should not use Gem's upgrade methods to upgrade if they installed from the package manager originally.) > Because Debian added a hard-coded hack RubyGems to use /var/lib instead > of using GEM_PATH and GEM_HOME. I don't know why RubyGems is using > /usr/lib/ruby/gems instead of /usr/local/lib/ruby/gems, but I suspect > that Ruby's Config::CONFIG has been partially modified. See /usr/share/doc/libgems-ruby1.8/README.Debian which says that Debian's rubygems package respects your GEM_HOME environment variable if you set it yourself. >> Now I realize the paticular oddities of this are not necessarily >> RubyGems problems. I was using the Ubuntu patched version, but I've >> looked at that patch and all it did was hardcode the GEM_HOME >> environment variable to be /var/lib/rubygems. > > Yes, it is regrettable that Debian didn't instead add GEM_HOME to / > etc/profile (or equivalent). In that case (other than the /usr/lib vs > /usr/local/lib problem) upgrading RubyGems would Just Work. Adding GEM_HOME in this way would be badly broken from the distribution's perspective. See http://lists.debian.org/debian-devel/1999/06/ msg00561.html --Ken -- Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/