RubyGems 0.8.1: installation of log4r 1.0.5 failed

Discussion in 'Ruby' started by benny, Sep 25, 2004.

  1. benny

    benny Guest

    dear list

    installing of log4r 1.0.5 worked fine with rubygems 0.7 but
    failed with rubygems 0.8.1.

    neither
    "gem install --remote log4r --no-rdoc "
    nor
    "gem install log4r"

    does install any log4r.rb
    no error messages except for "gem install log4r":

    Attempting local installation of 'log4r'
    Local gem file not found: log4r*.gem
    Attempting remote installation of 'log4r'
    Successfully installed log4r, version 1.0.5
    Installing RDoc documentation for log4r-1.0.5...

    src/log4r/config.rb:4:0: Unrecognized directive 'nodoc'
    ....
    lots of similar messages

    any idea?

    benny
     
    benny, Sep 25, 2004
    #1
    1. Advertising

  2. benny

    Chad Fowler Guest

    On Sun, 26 Sep 2004 03:14:27 +0900, benny <> wrote:
    > dear list
    >
    > installing of log4r 1.0.5 worked fine with rubygems 0.7 but
    > failed with rubygems 0.8.1.
    >
    > neither
    > "gem install --remote log4r --no-rdoc "
    > nor
    > "gem install log4r"
    >
    > does install any log4r.rb
    > no error messages except for "gem install log4r":
    >
    > Attempting local installation of 'log4r'
    > Local gem file not found: log4r*.gem
    > Attempting remote installation of 'log4r'
    > Successfully installed log4r, version 1.0.5
    > Installing RDoc documentation for log4r-1.0.5...
    >
    > src/log4r/config.rb:4:0: Unrecognized directive 'nodoc'
    > ....
    > lots of similar messages
    >
    > any idea?
    >


    Hi benny,

    How are you checking to see if log4r is installed? Try this one if
    you don't mind:

    require 'rubygems'
    require 'log4r'
    ObjectSpace.each_object(Class) do |k|
    p k if k.to_s =~ /Log/
    end

    On my system, I see a lot of Log4r classes such as
    Log4r::StdoutOutputter and Log4r::FileOutputter.

    You could also do (in UNIX):
    $ ls `gem env gempath`/gems/

    and/or

    $ gem search -l log

    *** LOCAL GEMS ***

    log4r (1.0.5)
    Log4r is a comprehensive and flexible logging library for Ruby.


    Thanks,
    Chad
     
    Chad Fowler, Sep 25, 2004
    #2
    1. Advertising

  3. benny

    benny Guest

    dear chad,


    Chad Fowler wrote:

    > How are you checking to see if log4r is installed? Try this one if
    > you don't mind:
    >
    > require 'rubygems'
    > require 'log4r'
    > ObjectSpace.each_object(Class) do |k|
    > p k if k.to_s =~ /Log/
    > end
    >

    require 'log4r'
    failed.

    log4r.rb and the dir log4r should be in

    /usr/local/lib/ruby/site_ruby/1.8

    (using ruby 1.8 under freebsd 5.2.1)

    when I use the install.rb that comes with log4r it works, but
    not with gems (though it was installed in the gems-dir)

    I think I got it working with rubygem 0.7 and freebsd 4.10 some time ago.


    benny
     
    benny, Sep 25, 2004
    #3
  4. benny

    Chad Fowler Guest

    On Sun, 26 Sep 2004 05:24:27 +0900, benny <> wrote:
    > dear chad,
    >
    >
    > Chad Fowler wrote:
    >
    > > How are you checking to see if log4r is installed? Try this one if
    > > you don't mind:
    > >
    > > require 'rubygems'
    > > require 'log4r'
    > > ObjectSpace.each_object(Class) do |k|
    > > p k if k.to_s =~ /Log/
    > > end
    > >

    > require 'log4r'
    > failed.
    >


    Did you also do "require 'rubygems'"?

    > log4r.rb and the dir log4r should be in
    >
    > /usr/local/lib/ruby/site_ruby/1.8
    >


    No. It should be under the gem installation directory. If you do:
    gem environment, you'll see which directory that is.

    This is a weird one I haven't seen. I appreciate you working through
    the problem with me.

    Thanks!
    Chad
     
    Chad Fowler, Sep 26, 2004
    #4
  5. benny

    benny Guest

    Chad Fowler wrote:

    >
    > Did you also do "require 'rubygems'"?


    no I thought this was only for "on the fly installation".
    I really don't want to include the whole rubygems thing
    everywhere I need a gem-package
    >
    >> log4r.rb and the dir log4r should be in
    >>
    >> /usr/local/lib/ruby/site_ruby/1.8
    >>

    >
    > No.  It should be under the gem installation directory.   If you do:
    > gem environment, you'll see which directory that is.


    that is
    /usr/local/lib/ruby/gems/1.8

    and that's ok, there is some

    log4r-1.0.5

    directory in the gems-subdir with

    doc
    examples
    src
    tests

    but my previous installation also installed into
    /usr/local/lib/ruby/site_ruby/1.8

    a log4r.rb and the dir log4r, so that I could do a simple
    require 'log4r' in my scripts

    why doesn't this work anymore?

    benny
    >
    > This is a weird one I haven't seen.  I appreciate you working through
    > the problem with me.
    >
    > Thanks!
    > Chad
     
    benny, Sep 26, 2004
    #5
  6. On Monday, September 27, 2004, 12:44:31 AM, benny wrote:

    > Chad Fowler wrote:


    >>
    >> Did you also do "require 'rubygems'"?


    > no I thought this was only for "on the fly installation".
    > I really don't want to include the whole rubygems thing
    > everywhere I need a gem-package


    That's life, I'm afraid. It's the price for having the convenience of
    RubyGems. Of course, RG could have been designed/implemented
    differently, not needing that extra require, but I believe the right
    choice was made. If RG is a standard part of Ruby one day, it will no
    longer be necessary.

    If you object to the keyboarding hassle, set your environment variable

    RUBYOPT=rubygems

    If you object to the run-time overhead, rest assured that it is fairly
    light, I believe.

    > [...]
    > but my previous installation also installed into
    > /usr/local/lib/ruby/site_ruby/1.8


    > a log4r.rb and the dir log4r, so that I could do a simple
    > require 'log4r' in my scripts


    > why doesn't this work anymore?


    It's changed in the latest version. It worked before by installing
    library stubs which load the gem for you. However, that solution is
    fragile, misleading, and pretty ugly, I reckon. After you require
    'rubygems' now, any "require" statement will search your site_ruby
    directory as well as your installed gems. It's a more elegant and
    robust solution, with the associated "hassle".

    Cheers,
    Gavin
     
    Gavin Sinclair, Sep 26, 2004
    #6
  7. benny

    benny Guest

    Gavin Sinclair wrote:

    > It's changed in the latest version.

    I didn't notice that, sorry.

    thank you for your effort

    benny
     
    benny, Sep 26, 2004
    #7
  8. On Monday, September 27, 2004, 4:49:26 AM, benny wrote:

    > Gavin Sinclair wrote:


    >> It's changed in the latest version.

    > I didn't notice that, sorry.


    That happens :) RubyGems has been in positive flux for a while, but
    0.8 was a very important release, in that the changes you are noticing
    shouldn't have to change again.

    > thank you for your effort


    No problem.

    Gavin
     
    Gavin Sinclair, Sep 27, 2004
    #8
    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. David Heinemeier Hansson

    Log4r and Ruby 1.8.0 in Singleton problems

    David Heinemeier Hansson, Aug 5, 2003, in forum: Ruby
    Replies:
    0
    Views:
    153
    David Heinemeier Hansson
    Aug 5, 2003
  2. Leon Torres
    Replies:
    1
    Views:
    126
    Leon Torres
    Sep 3, 2003
  3. Trevor
    Replies:
    5
    Views:
    573
    Bill Kelly
    Jan 29, 2005
  4. Erik Veenstra
    Replies:
    4
    Views:
    817
    Austin Ziegler
    Feb 4, 2005
  5. Eric Roscher
    Replies:
    3
    Views:
    366
    Eric Roscher
    Nov 24, 2009
Loading...

Share This Page