Mandriva 2010.1, ruby 1.8.7, gem 1.4.1
A few months ago I installed the OptionParser gem and have been using
it successfully until a gem update --system. Now the interpreter
cannot locate the directories containing the gem.
Script header:
#!/usr/bin/env ruby
require ‘rubygems’
require ‘commandline/optionparser’
include CommandLine
require ‘tk’
error:
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`gem_original_require’: no such file to load --commandline/optionparser
(LoadError)
An experiment with
require
‘/usr/lib/ruby/gems/1.8/gems/OptionParser-0.5.1/lib/commandline/
optionparser’
raised similar errors on the files required by optionparser.rb which
were
commandline/optionparser/option and commandline/optionparser/optiondata.
I don’t know how to proceed from here. Looks like the default search
paths have been affected by the update of rubygems. ??
At the command line puts $LOAD_PATH gives undefined variable. In irb
the require ‘commandline/optionparser’ fails as expected and a puts
“#{LOAD_PATH}” reports uninitialized constant. I have never had to
set the LOAD_PATH in the past. Has something changed with gem 1.4.1?
What I have noticed is that the one gem installed after the update
appears by itself in a newly created /usr/lib64/ruby/gems/1.8/gems.
Happy new Year
Len