RubyGems 0.8.1: installation of log4r 1.0.5 failed

B

benny

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
 
C

Chad Fowler

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
 
B

benny

dear chad,


Chad said:
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
 
C

Chad Fowler

dear chad,



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
 
B

benny

Chad said:
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
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
 
G

Gavin Sinclair

Chad Fowler wrote:
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
 
G

Gavin Sinclair

Gavin Sinclair wrote:
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
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top