Problem with LOAD_PATH after gem update

L

Len Lawrence

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
 
J

Jakub Groncki

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

Happy New Year ;)
 
L

Len Lawrence

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

Happy New Year ;)

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
 
E

Eric Hodel

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

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

Len Lawrence

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top