From: ptkwt@... (Phil Tomson) Date: 2003-12-24T13:36:55+09:00 Subject: Re: RubyGems and dependencies In article , Joey Gibson wrote: >On Wed, 24 Dec 2003, Francis Hwang wrote: > >> 1. If I use RubyGems to document a dependency to another gem then am I >> correct in thinking it's not enough to simply have had that library >> installed -- I explicitly need that gem, right? I mean, Lafcadio >> depends on REXML and when I try to install the Lafcadio gem it tells >> me it can't find the REXML gem. REXML is already installed (I'm using >> Ruby 1.8 so it's part of the std library) but I'll need to install the >> REXML gem so that my Lafcadio gem will work, right? > >This is the situation I tried to point out at RubyConf that I'd seen with >RedHat's rpm package manager. Namely that if I've already installed a >piece of software, without using the package manager, what will happen >when I try to install something else that _does_ use the package manager? >I don't really know how to solve it unless you can fake out the package >manager (gem-thingy) or have the gem producer provide some sort of test >that the gem-thingy can use at install time to check for the existence of >a piece of software that was installed manually. Maybe a filename/pathname >that it can check for as a last resort if the gem for a needed something >isn't found. Something like: #let's see if they've already got rexml: begin require 'rexml' rescue MissingPackage #or whatever it's really called #it's really not here, so go look for one to download ... else #it is here already, maybe check out the version somehow #otherwise everything should be OK end Phil