From: Assaph Mehr Date: 2005-03-18T09:24:53+09:00 Subject: Re: encapsulating rubygems so that my users don't need to be aware of it > On 2005-03-17, Csaba Henk wrote: > > %w(lib_a lib_b lib_c).each {|lib| > > begin > > require lib > > rescue LoadError > > begin > > require rubygems > > rescue LoadError > else true # this is also needed here... > > end and retry > > end > > } If the user has *no* version of the lib (i.e. not the gem and not the regular version) you would get into an infinite loop here. In Instiki/Pimki we tackle this like so: the tgz includes the libs needed, while the gem version does not but does specify them as dependencies. When starting we test if this is a gem or not and know how to require the necessary libs. Does this help? Cheers, Assaph