[OOT] Gem usage on Fedora

N

Nasir Khan

[Note: parts of this message were removed to make it a legal post.]

This may be s stupid mistake on my part, but I have spent a good hour on it.

Just compiled ruby on Fedora 8, then installed rubygems and then installed a
few gems -

$ gem list

*** LOCAL GEMS ***

facets (1.8.54)
flexmock (0.8.0)
log4r (1.0.5)
rake (0.8.1)

Now in trying to use them I did -

$ export RUBYOPT='-w -rubygems'
and then
$ irb
irb(main):001:0> $:
=> ["/usr/local/lib/ruby/site_ruby/1.8",
"/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux",
"/usr/local/lib/ruby/site_ruby", "/usr/local/lib/ruby/1.8",
"/usr/local/lib/ruby/1.8/x86_64-linux", "."]
irb(main):002:0>
irb(main):003:0*
irb(main):004:0* require 'log4r'
LoadError: no such file to load -- log4r
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from (irb):4


The gems are installed properly -

$ gem which log4r
(checking gem log4r-1.0.5 for log4r)
/usr/local/lib/ruby/gems/1.8/gems/log4r-1.0.5/src/log4r.rb


What I may be missing?

Regards
Nasir
 
D

Daniel Finnie

Hi,

I think it is -rrubygems, the -r for require and rubygems for the name
of the library.

Dan
 
J

Jörg W Mittag

Daniel said:
I think it is -rrubygems, the -r for require and rubygems for the name
of the library.

Actually, RubyGems ships with a wrapper library called 'ubygems' (note
the missing 'r'), which enables this neat trick.

jwm
 

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,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top