From: Eric Hodel Date: 2007-11-21T08:09:18+09:00 Subject: Re: RubyGems 0.9.5 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. >> > I'm all ears if some one wants to fill me in on what Apple did... Apple wanted to integrate RubyGems with Leopard in a manner that was as invasive as Debian's, but instead of demanding changes, provided patches with tests. > My issue is not with distribution packaging it's with the poor > assumptions that RubyGems makes. It's not that I don't have a > dozen options to work around this. It's that it will never 'just' > work until RubyGems allows for these types of distribution > requirements and there's absolutely no reason it can't. RubyGems allows for this and has for a long time. GEM_PATH and GEM_HOME are not new. Even lower-level than that, you can override values in Config::CONFIG from Ruby to match what you desire and not need to set GEM_HOME at all. > 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? 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. > 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. > Why would id decide to install into /usr/local? My understanding of FHS says that RubyGems must be installed in /usr/ local if you install it by hand. > RubyGems has become a core part of Ruby. It needs to just work! > As it > is I still can't use it on production servers because I have no > confidence it's not going to going to go mucking around in folders > that > don't belong to it. Set GEM_HOME correctly, and RubyGems will only touch that directory on install or uninstall. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars