From: Michael Libby Date: 2008-12-27T01:01:15+09:00 Subject: Re: how to make installing Ruby easier for amateurs On Mon, Dec 22, 2008 at 12:15 AM, Tom Cloyd wrote: > or the Adept package manager. Then I install Rubygems with apt-get (it's not > in Adept's sources, apparently). Adept, in my extremely limited experience, is not there yet. sudo apt-get install synaptic > Ready to GO? You would think so. Naively, I always do. But it's not to be. > Now the madness starts, and this is what I want fixed. Most of this "madness" had nothing to do with Ruby and everything to do with the decisions made by Debian and Ubuntu about how to package Ruby. > It turns out that Rubygems has a hidden dependency (I think I'm using the > right term, but if not, correct me). Well, it's not hidden if you use the Debian packaging system as designed. I don't know the command-line interface for it, but in Synaptic you can see a list of recommended and suggested packages that go with any given package. In the case of Rubygems, build-essential and ruby-dev are the dependencies you are looking for here, and both of them are suggested. > It isn't automatically installed, and > without it, gem installation simply crashes and burns, without useful > comment. For an amateur such as me, this isn't helpful, to put it mildly. > Here's what happens: > > ~$ sudo gem install RedCloth > Building native extensions. This could take a while... > ERROR: Error installing RedCloth: > ERROR: Failed to build gem native extension. For a lot of gems that don't need C compilers to be installed there won't be any crashing or burning. As an aside, these same gems that need C compilers on Ubuntu may be hard to install on some other operating systems. If you think the Ubuntu package system isn't very helpful, you should see the one included with Windows. ;) > /usr/bin/ruby1.8 extconf.rb install RedCloth > extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) > from extconf.rb:1 Did you try this first? sudo apt-get install libredcloth-ruby\ > So...if Rubygems needs this library or whatever, why cannot it check to see > that it's present, and then complain if it's not? The error msg it does > report means nothing to me at all. Personally, I think the Ruby package from > Adept should include this, but that's another story. Adept is just an interface to the Debian/Ubuntu package system. You might be happier with Synaptic. It makes finding packages a cinch, and then makes it relatively easy to discover what the "optional" dependencies might be. -Michael -- Michael C. Libby www.mikelibby.com