From: Jim Weirich Date: 2004-12-09T03:18:04+09:00 Subject: Re: Require Gems (was Re: [ANN] RubyScript2Exe 0.2.0) Mauricio Fern�ndez said: >> Hmm, is this a good thing? If Ruby Gems replaces the require(), >> couldn't it be set to try the old require() when a Gem require fails? >> Just a thought. > > I didn't phrase that correctly. require 'foo' will load preferentially > the file in the gemdir (instead of the one in sitelibdir as usual). Actually, this isn't accurate either. Gems will only prefer the gem based file if the gem containing that file has been activated. Things that will activate a gem: * an explicit require_gem * requiring of a file not found in the current load path, but can be found in a gem. Once activated, files from the activated gem will be preferred. However, files from unactivated gems will continue to be preferred from the existing load path. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)