clbustos / statsample

A suite for basic and advanced statistics on Ruby.
http://github.com/clbustos/statsample
BSD 3-Clause "New" or "Revised" License
402 stars 96 forks source link

Rails3 undefined method `zero?' for nil:NilClass -- statssample override's Rail's Enumerable.sum #45

Open rrauenza opened 9 years ago

rrauenza commented 9 years ago

This issue

http://stackoverflow.com/questions/8899272/rails-3-undefined-method-zero-for-nilnilclass-in-many-to-many-relationsh http://stackoverflow.com/questions/9289535/rails-3-2-uniqueness-validation-raises-undefined-method-zero-for-nilnilclass

also seems to affect this gem when using this within Rails 3.

Is there a workaround?

einpaule commented 9 years ago

The workaround we are using is using a version < 1.5.0, as this is the version this issue was introduced.

h0jeZvgoxFepBQ2C commented 8 years ago

Had the same problem with rails 3.2.22... Really nasty to debug!

kinnrot commented 7 years ago

+1

pedrorio commented 7 years ago

Any update on this?

kinnrot commented 7 years ago

I just removed it.. https://github.com/ClusterTV/statsample/