Tatva-Artha

meaning of "it"

Ruby 1.8.7: NoMethodError: undefined method `[]‘ for Enumerable::Enumerator

with one comment

After upgrading ruby from 1.8.6 to 1.8.7, you may run into this issue:

NoMethodError: undefined method `[]‘ for Enumerable::Enumerator

To resolve this, create a initializer file (in config/initializer/ruby187_compat.rb)

unless '1.9'.respond_to?(:force_encoding)
String.class_eval do
begin
remove_method :chars
rescue NameError
# OK
end
end
end

http://www.tatvartha.com/wp-content/plugins/sociofluid/images/digg_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/reddit_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/stumbleupon_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/delicious_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/google_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/twitter_16.png

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Written by admin

May 23rd, 2009 at 12:00 am

Posted in All

Tagged with

One Response to 'Ruby 1.8.7: NoMethodError: undefined method `[]‘ for Enumerable::Enumerator'

Subscribe to comments with RSS or TrackBack to 'Ruby 1.8.7: NoMethodError: undefined method `[]‘ for Enumerable::Enumerator'.

  1. This worked

    ukanani

    31 Oct 10 at 9:09 pm

Leave a Reply