Crash with AR 2.2.2


I used to have a very simple import routine,the full horror of which can
seen here,

As of an update in either AR 2.2.2 or AAF (I think it’s this, as I’d
been on 2.2.2 for a while), when I ever I call this index method I get
this when it gets to the rebuild_index part of the import method,

Does anyone know why this would be?

disclaimer, yes, I know the code suxx. Still learning this Ruby lark.

thanks in advance for anyone who can help