Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > madeleine gem problem (or rubygem one)

Reply
Thread Tools

madeleine gem problem (or rubygem one)

 
 
gabriele renzi
Guest
Posts: n/a
 
      05-04-2004
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]
 
Reply With Quote
 
 
 
 
Jamis Buck
Guest
Posts: n/a
 
      05-04-2004
gabriele renzi wrote:

> 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
http://www.velocityreviews.com/forums/(E-Mail 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"'


 
Reply With Quote
 
 
 
 
gabriele renzi
Guest
Posts: n/a
 
      05-04-2004
il Wed, 5 May 2004 02:29:34 +0900, Jamis Buck <(E-Mail Removed)> 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
 
Reply With Quote
 
Gavin Sinclair
Guest
Posts: n/a
 
      05-04-2004
On Wednesday, May 5, 2004, 3:48:56 AM, gabriele wrote:

> il Wed, 5 May 2004 02:29:34 +0900, Jamis Buck <(E-Mail Removed)> 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


Any idea why you didn't understand this? Do the docs need to be more
explicit?

Cheers,
Gavin



 
Reply With Quote
 
gabriele renzi
Guest
Posts: n/a
 
      05-04-2004
il Wed, 5 May 2004 06:33:19 +0900, Gavin Sinclair
<(E-Mail Removed)> ha scritto::


>> wow, never understood this thanks for pointing out

>
>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
 
Reply With Quote
 
Gavin Sinclair
Guest
Posts: n/a
 
      05-05-2004
On Wednesday, May 5, 2004, 8:33:58 AM, gabriele wrote:

>>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'.


I added a note to this effect. Thanks!

Gavin




 
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
RubyGem, find path of installed gem through ruby. Aaron Smith Ruby 10 01-16-2009 07:23 PM
Could not find RubyGem - because it's not a gem Daniel Berger Ruby 4 10-29-2008 10:22 PM
gem on ubuntu problem : /usr/local/lib/site_ruby/1.8/rubygem Jp Jp Ruby 4 12-28-2007 10:13 AM
Rubygem install "Invalid argument - sources-0.0.1.gem" Jeremy Lecour Ruby 15 02-08-2007 10:50 AM
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM



Advertisments