From: Eric Hodel Date: 2008-06-06T14:39:38+09:00 Subject: Re: conflict between soap4r gem and stdlib On Jun 5, 2008, at 21:24 PM, Joel VanderWerf wrote: > I installed a newer version of soap4r as a gem, but, when I require > soap, the old version (which came with ruby) is the one that is > loaded. > > $ ruby -r soap/soap -e 'p SOAP::VERSION' > "1.5.5" > $ grep VERSION /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/ > soap/soap.rb > VERSION = Version = '1.5.8' > $ ruby -v > ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux] > > I can hack around this easily enough (install from a tar, maybe), > but why isn't the gem found first? RubyGems will only search for a file in a gem when it isn't in $LOAD_PATH. Use gem 'soap4r' to put the gem in $LOAD_PATH before the stdlib version before you require anything from soap4r. (I believe this is included in the soap4r documentation.)