From: Ryan Davis Date: 2005-06-28T13:08:02+09:00 Subject: Re: RubyGems Issue On Jun 25, 2005, at 3:02 PM, Patrick Fernie wrote: > I'm having a not-so-critical-but-still-irritating issue with > rubygems. It installed fine, and i can use gems, but only using > require_gem; using the redefined require (from custom_require.rb) > results in a load error. The difference is that require_gem refers to the gem name and the patched require does not, it still refers to the library name. Another example is my gem ParseTree. You can do: require 'rubygems' require_gem 'ParseTree' # auto-requires parse_tree require 'sexp_processor' Since require_gem can only (currently) auto-require a single library, if you want sexp_processor, you have to do that with a regular require. Alternatively, you can leave the gem names out of it: require 'rubygems' require nil # require for non-gem setups require 'parse_tree' require 'sexp_processor' Either one works fine. I prefer the latter and am switching all my code to it. -- ryand-ruby@zenspider.com - Seattle.rb - http://www.zenspider.com/ seattle.rb http://blog.zenspider.com/ - http://rubyforge.org/projects/ruby2c