From: Daniel Jewett Date: 2007-07-13T01:55:10+09:00 Subject: Re: Yet another site_ruby question... In article <46e285d2c6a7f2ca596e69a120d355b5@ruby-forum.com>, Alin Popa wrote: > Daniel Jewett wrote: > > > If I move the gem to site_ruby on my desktop, the load succeeds. My > > question is why the inconsistency? > > If the install location is incorrect why does require work on one > > machine and not the other? > > > > Here's the result of the install command on both machines: > > Successfully installed flacinfo-rb-0.3 > > Installing ri documentation for flacinfo-rb-0.3... > > File not found: lib > > > > Is that last bit significant? > > > > Thanks for any info, > > Dan J. > > Hi Daniel, > > Did you tried by using "gem" command ? > (gem instead of require_gem, which is obsolete) > Maybe in one machine, by default, that lib is loaded and on the other > one, not? > I'm just guessing. > > All the best, > > Alin Thanks Alin, Here's the result of my experiment with the gem command: $ irb irb(main):001:0> gem 'flacinfo' NoMethodError: undefined method `gem' for main:Object from (irb):1 irb(main):002:0> require 'rubygems' => true irb(main):003:0> gem 'flacinfo' Gem::LoadError: Could not find RubyGem flacinfo (>= 0.0.0) from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:304:in `report_activate_error' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:238:in `activate' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:76:in `active_gem_with_options' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem' from (irb):3 irb(main):004:0> gem 'flacinfo-rb' => true irb(main):005:0> song = FlacInfo.new("dread.flac") NameError: uninitialized constant FlacInfo from (irb):5 'require' and 'gem' really want to find the library under 'site_ruby.' If I move it there, everything works. I just still can't figure out why it works without being in 'site_ruby.' on my other machine. :-( The installations of ruby, rubygems, etc. where exactly the same on both. Dan J.