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

statsample override of array#sum conflicts with gem activerecord-import #56

Open lentesta opened 2 years ago

lentesta commented 2 years ago

In debugging this issue with activerecord-import, it appears that statsample overrides Array in a way that breaks activerecord-import.

That issue contains a small sample program that reproduces the issue. It seems specific to Array#sum.

The temporary solution I have is to monkey patch the insert_many method in ActiveRecord::Import::MysqlAdapter.

I think the long-term solution would be a fix in statsample. Happy to help with this, if needed.

HansHauge commented 8 months ago

Yeah, this gem breaks rails. Don't use until this gets fixed.