madeleine gem problem (or rubygem one)

G

gabriele renzi

Hi gurus and nubys,

I believe I spotted a bug in rubygems or in the packaged gem for
madeleine. I got this:

C:\Documents and Settings\gabriele>gem --rubygems-info
RubyGems:
- VERSION: 1.0
- INSTALLATION DIRECTORY: c:/programmi/ruby/lib/ruby/gems/1.8
- GEM PATH:
- c:/programmi/ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org

C:\Documents and Settings\gabriele>irb -r rubygems
irb(main):001:0> require_gem 'madeleine'
=> true
irb(main):002:0> require_gem 'madeleine/clock'
LoadError:
Could not find RubyGem madeleine/clock (> 0.0.0)

from
c:/Programmi/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:25:in `require
_gem'
from (irb):2
irb(main):003:0>

running pragprog installer on windows xp:
C:\Documents and Settings\gabriele>ruby -v
ruby 1.8.1 (2003-12-25) [i386-mswin32]
 
J

Jamis Buck

gabriele said:
C:\Documents and Settings\gabriele>irb -r rubygems
irb(main):001:0> require_gem 'madeleine'
=> true
irb(main):002:0> require_gem 'madeleine/clock'
LoadError:
Could not find RubyGem madeleine/clock (> 0.0.0)

from
c:/Programmi/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:25:in `require
_gem'
from (irb):2
irb(main):003:0>

Once you've required the gem, you don't need to use "require_gem"
anymore. Just use "require":

require_gem 'madeleine'
require 'madeleine/clock'

It's dying because it can't find a gem called "madeleine/clock', and
indeed there is no such thing.

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

ruby -h | ruby -e
'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a <<
r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'
 
G

gabriele renzi

il Wed, 5 May 2004 02:29:34 +0900, Jamis Buck <[email protected]> ha
scritto::

Once you've required the gem, you don't need to use "require_gem"
anymore. Just use "require":

require_gem 'madeleine'
require 'madeleine/clock'

It's dying because it can't find a gem called "madeleine/clock', and
indeed there is no such thing.

wow, never understood this :) thanks for pointing out
 
G

gabriele renzi

il Wed, 5 May 2004 06:33:19 +0900, Gavin Sinclair
Any idea why you didn't understand this? Do the docs need to be more
explicit?

well, I'd say so.
looking at:
http://rubygems.rubyforge.org/wiki/wiki.pl?UserGuide
it should be stated something like
'once you did require_gem(libby) you basically added the 'libby' gem
to $LOAD_PATH, and can then handle it with normal requires'.

Note that I don't think what I wrote is correct, so I'm not going to
update the wiki myself :)
 

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
474,262
Messages
2,571,058
Members
48,769
Latest member
Clifft

Latest Threads

Top