[lnkForumImage]
TotalShareware - Download Free Software

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


 

Stephen Ng

8/30/2006 10:08:00 AM

Hi!

I just tried installing facets-1.7.30.

I keep getting this error -

require 'facets'
LoadError: no such file to load -- facets/core/enumerable/each_slice
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/lib/ruby/gems/1.8/gems/facets-1.7.30/lib/facets.rb:89
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
`require'
from (irb):2

I get the same error when installing the facets gem.

Can anyone help?

Regards.

Stephen

3 Answers

Trans

8/30/2006 11:25:00 AM

0


Stephen Ng wrote:
> Hi!
>
> I just tried installing facets-1.7.30.
>
> I keep getting this error -
>
> require 'facets'
> LoadError: no such file to load -- facets/core/enumerable/each_slice
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
> from /usr/lib/ruby/gems/1.8/gems/facets-1.7.30/lib/facets.rb:89
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
> `require'
> from (irb):2
>
> I get the same error when installing the facets gem.

My apologies for any inconvenience. enumerable/each_slice is being
deprecated. Unfortunately the ChangeLog entry for this got mangled
somehow and said nothing but "ice" (the last three letters of of
each_slice). The reason is Ruby now supports each_slice in the standard
library. All you have to do is:

require 'enumerator'

And I beleive as of Ruby 1.9 this will built-in functionality too and
there will no longer be a need for the require (Can anyone verify
that?)

Nonetheless I'll am goging to release a minor update to facets today
that fixes this issue. It will be a temproray patch the will just
redirect 'enumerable/each_slice' to 'enumerator'.

One important consideration though is that Ruby's each_slice and
Facets' previous version differ in that Ruby's will not use the block's
arity if no slice count is given --it will raise an Argument error
instead. To get this behavior back use Facets' #each_by (maybe I'll
submit an RCR for this).

HTH,
T.

James Gray

8/30/2006 3:41:00 PM

0

On Aug 30, 2006, at 6:30 AM, Trans wrote:

> And I beleive as of Ruby 1.9 this will built-in functionality too and
> there will no longer be a need for the require (Can anyone verify
> that?)

$ ruby_yarv -ve '(1..10).each_slice(3) { |trio| p trio }'
ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-darwin8.7.1]
YARVCore 0.4.1 Rev: 527 (2006-07-19) [opts: [direct threaded code]
[inline method cache] ]
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
[10]

James Edward Gray II

Trans

8/31/2006 7:00:00 PM

0


James Edward Gray II wrote:
> On Aug 30, 2006, at 6:30 AM, Trans wrote:
>
> > And I beleive as of Ruby 1.9 this will built-in functionality too and
> > there will no longer be a need for the require (Can anyone verify
> > that?)
>
> $ ruby_yarv -ve '(1..10).each_slice(3) { |trio| p trio }'
> ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-darwin8.7.1]
> YARVCore 0.4.1 Rev: 527 (2006-07-19) [opts: [direct threaded code]
> [inline method cache] ]
> [1, 2, 3]
> [4, 5, 6]
> [7, 8, 9]
> [10]
>
> James Edward Gray II

Righ on. Thanks.

T.