rails
(4,417 views)

stack level too deep

My specs started failing, I traced the problem to the acts_as_paranoid plugin

I just want to share this since I wasted a lot of time tracking it down.

After upgrading my Mac to Snow Leopard, I ran the specs on my ReviewRamp app and things were failing. Actually I have no idea if or why its related to the OSX upgrade, but it could be just a coincidence. I had been away from this app for a month so maybe I did something several weeks ago to cause it and didn't re-run the spec suite. Who knows. It doesn't matter. What matters is it stopped working. I was getting errors like

"stack level too deep"

in 

vendor/plugins/acts_as_paranoid/init.rb:3:in `belongs_to_without_deleted'

The model that it was failing in didn't even use acts_as_paranoid!

I dissected my app, removing acts_as_paranoid altogether and commenting it out of models that used it, and then my specs passed.

Googling I found some old references to similar cases where that plugin was being initialized more than once, screwing up the alias_method_chain. Digging around some more I found a recent fork to the plugin which fixes the problem.

http://github.com/edendevelopment/acts_as_paranoid/commit/f73ce8d9fe7c70d15f47f70be154fb0a1920900b

So I just removed the original acts_as_paranoid and installed the forked on, and all is fine now.

  $ script/plugin install git://github.com/edendevelopment/acts_as_paranoid.git

This really should be merged back into the original technoweenie repository.

 

 

Comments

by Uri Lewin on Oct 14, 2009

>>

Very helpful pointer, thanks.

by DanielPep on Feb 09, 2015

Erotic video here

Hello. Lovely girl. Do you want to really make money online? Try sdelayt spectacular career in webcam business. You just like to be independent, liberated and to earn $ 1000 a month at home in a cozy bed, no sex! Guarantee payment of salary 2 times a month. Conclude the contract. When registering the first 20 girls BONUS $ 100 $ on your personal account! <a href=http://www.chatprivate.net/performer/register/>free sex video chat</a>

New Comment

markdown formatting permitted