Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [OOT] Gem usage on Fedora

Reply
Thread Tools

[OOT] Gem usage on Fedora

 
 
Nasir Khan
Guest
Posts: n/a
 
      03-14-2008
[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

 
Reply With Quote
 
 
 
 
Daniel Finnie
Guest
Posts: n/a
 
      03-16-2008
Hi,

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

Dan

On Fri, Mar 14, 2008 at 2:17 PM, Nasir Khan <(E-Mail Removed)> wrote:
> 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
>


 
Reply With Quote
 
 
 
 
Jörg W Mittag
Guest
Posts: n/a
 
      03-16-2008
Daniel Finnie wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
gem.cmd install RMagick-win32-1.9.2-mswin32.gem: Buffer error Clifford Heath Ruby 7 06-09-2006 07:02 PM
[GEM PATCH] allow gem to install bin file to different location Ara.T.Howard Ruby 0 10-26-2005 11:52 PM
ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rubygems-upodate (> 0) in the repository han Ruby 1 10-24-2005 10:28 PM
[ANN] Getopt-Declare 1.12 (gem/zip) and GGEnv (gem/zip) gga Ruby 0 07-18-2005 03:21 PM



Advertisments