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.