Problem with LOAD_PATH after gem update

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

I know that it sounds a bit lamely, but try to uninstall the gem and
then install it again.

Happy New Year :wink:

On Sun, 02 Jan 2011 15:38:39 -0500, Jakub Groncki wrote:

I know that it sounds a bit lamely, but try to uninstall the gem and
then install it again.

Happy New Year :wink:

Aye, I did that and sure enough the script works again. The gem now
installs into the lib64 path so I suppose anything else I use will have
to be reinstalled. It must be a feature of the latest rubygem-update to
go with the system architecture.

Thanks

Len

On Jan 3, 2011, at 10:50, Len L. wrote:

On Sun, 02 Jan 2011 15:38:39 -0500, Jakub Groncki wrote:

I know that it sounds a bit lamely, but try to uninstall the gem and
then install it again.

Happy New Year :wink:

Aye, I did that and sure enough the script works again. The gem now
installs into the lib64 path so I suppose anything else I use will have
to be reinstalled. It must be a feature of the latest rubygem-update to
go with the system architecture.

It’s a feature of your ruby. RubyGems installs in the directories that
match your ruby install.

On Mon, 03 Jan 2011 14:03:26 -0500, Eric H. wrote:

It’s a feature of your ruby. RubyGems installs in the directories that
match your ruby install.

Yes, ruby is x86_64. Don’t know when that changed. A couple of dozen
gems installed to /usr/lib/ruby… earlier.