From: Lloyd Zusman Date: 2005-09-09T19:59:01+09:00 Subject: Re: Rio 0.3.4 rio4ruby Wrote: > Lloyd Zusman wrote: > > % irb > > irb(main):001:0> require_gem 'rio' > > => true > > irb(main):002:0> rio('/tmp/abc') > rio('/tmp/xyz') > > NameError: uninitialized constant RIO::Ops::FileOrDir::ExistOrNot > > from /usr/local/lib/ruby/gems/1.8/gems/rio-0.3.4/lib/rio/ops/file.rb:62 > > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > .... > I can not reproduce this. My irb session looks like this: > > irb(main):001:0> require 'rubygems' > => true > irb(main):002:0> require_gem 'rio' > => true > irb(main):003:0> rio('/tmp/abc') > rio('/tmp/xyz') > => # > % cat /tmp/xyz > abc > % > > The only difference between mine and yours, is "require 'rubygems'", > and when I leave that off I get an entirely different error: > > irb(main):001:0> require_gem 'rio' > NoMethodError: undefined method `require_gem' for main:Object > from (irb):1 > irb(main):002:0> rio('/tmp/abc') > rio('/tmp/xyz') > NoMethodError: undefined method `rio' for main:Object > from (irb):2 > > I admit that I have done very little testing on the gem installation > of Rio. If you figure this out please let me know, so I can document > it for other gem users. > > Cheers, > -Christopher Thanks for looking into this. I'll keep testing and see if I can isolate the problem. By the way, the reason that I didn't need "require 'rubygems'" is because I have the RUBYOPT environment variable set to "rubygems". If I unset this variable and do a "require 'rubygems'" before the "require_gem 'rio'" command, I get the same error. Also, in case this might shed some light on my problem ... % ruby --version ruby 1.8.2 (2004-12-25) [i686-linux] % gem --version 0.8.11 Prior to this, I had earlier problems with gems, and so I completely uninstalled ruby (I had been using the 1.9.x version from cvs), and I re-installed it from the official 1.8.2 version, totally from scratch with none of my old libraries, scripts, or gems present on my system. It was only then that I installed "gem", and then "rio". Thanks again for any help you folks might be able to give me on this. -- Lloyd Zusman ljz@asfast.com God bless you.