[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

require error in gems

BENI

2/22/2008 10:56:00 AM

I have installed rubyzip gems .

I have it jolly well in C:\ruby\lib\ruby\gems\1.8\gems\rubyzip-0.9.1

Now in irb i get

C:\ruby>irb
irb(main):001:0> require 'rubyzip'
LoadError: no such file to load -- rubyzip
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `re
quire'
from (irb):1
irb(main):002:0>


why so any hint.

Regards
4 Answers

Mark Bush

2/22/2008 11:45:00 AM

0

BENI wrote:
> C:\ruby>irb
> irb(main):001:0> require 'rubyzip'

You will need to include rubygems first:

require 'rubygems'
require 'rubyzip'

--
Posted via http://www.ruby-....

Mark Bush

2/22/2008 11:48:00 AM

0

Mark Bush wrote:
> require 'rubygems'
> require 'rubyzip'

Sorry - ignore that - it looks like you must already be including
rubygems somehow as your error comes from gems, not the standard
require.

--
Posted via http://www.ruby-....

Stephane Wirtel

2/22/2008 12:06:00 PM

0

Can you try with require 'rubygems' before your require 'rubyzip' ?

Thanks

Mark Bush

2/22/2008 12:17:00 PM

0

BENI wrote:
> C:\ruby>irb
> irb(main):001:0> require 'rubyzip'

For some reason best known to the gem author, the actual incantation is:

require 'rubygems' # if this is not previously included
require 'zip/zip'

Have a look at the scripts in the sample directory inside the installed
gem for more clues.

Mark

--
Posted via http://www.ruby-....