Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > conflict between soap4r gem and stdlib

Reply
Thread Tools

conflict between soap4r gem and stdlib

 
 
Joel VanderWerf
Guest
Posts: n/a
 
      06-06-2008

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?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      06-06-2008
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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
conflict function definition with stdlib.h hqin C Programming 24 01-17-2011 05:28 AM
gem libray name conflict problem Heesob Park Ruby 5 07-22-2009 02:16 AM
css conflict (or html conflict) charles cashion HTML 2 02-18-2009 09:41 PM
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
what is the difference between sort() (in stl) & qsort(stdlib.h) duyifan.nju@gmail.com C++ 2 10-22-2005 04:14 AM



Advertisments