[OOT] Gem usage on Fedora

Discussion in 'Ruby' started by Nasir Khan, Mar 14, 2008.

  1. Nasir Khan

    Nasir Khan Guest

    [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
    Nasir Khan, Mar 14, 2008
    #1
    1. Advertising

  2. 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 <> 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
    >
    Daniel Finnie, Mar 16, 2008
    #2
    1. Advertising

  3. 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
    Jörg W Mittag, Mar 16, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. metfan
    Replies:
    2
    Views:
    4,849
    Robert Olofsson
    Oct 21, 2003
  2. Colin J. Williams

    Webchecker Usage - a problem with local usage

    Colin J. Williams, Feb 25, 2004, in forum: Python
    Replies:
    1
    Views:
    537
    Colin J. Williams
    Feb 26, 2004
  3. Replies:
    0
    Views:
    418
  4. Austin 7873
    Replies:
    5
    Views:
    185
    Eric Hodel
    Jan 27, 2007
  5. Nasir Khan

    [OOT] rubygems: location of my gems

    Nasir Khan, Jan 4, 2008, in forum: Ruby
    Replies:
    5
    Views:
    123
    Nasir Khan
    Jan 4, 2008
Loading...

Share This Page