# Help solving a SystemStackError while testing

**URL:** <https://www.ruby-forum.com/t/help-solving-a-systemstackerror-while-testing/134763>\
**Category:** Rails\
**Created:** [April 14, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/help-solving-a-systemstackerror-while-testing/134763 "2008-04-14T22:29:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apswartz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71e660/32.png) [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Post date:** [April 14, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/help-solving-a-systemstackerror-while-testing/134763/1 "2008-04-14T22:29:44Z")

</div>

I have a model that uses both acts\_as\_taggable and betternestedset.

When I call “destroy” in my model unit task, the stack level gets too  
deep since Rails puts it in a transaction. Stack is here:  
/Users/alan/Projects/superb/vendor/plugins/acts\_as\_taggable\_on\_steroids/lib/acts\_as\_taggable.rb:220:in  
`reload_without_tag_list' /Users/alan/Projects/superb/vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:220:in`reload’  
/Users/alan/Projects/superb/vendor/plugins/betternestedset/lib/better\_nested\_set.rb:161:in  
`before_destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:322:in`send’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active\_record/callbacks.rb:322:in  
`callback' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:294:in`destroy\_without\_transactions’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active\_record/transactions.rb:104:in  
`destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in`transaction’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active\_record/transactions.rb:80:in  
`transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:100:in`transaction’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active\_record/transactions.rb:104:in  
`destroy' ./test/unit/task_test.rb:30:in`test\_create\_read\_update\_delete’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active\_support/testing/default.rb:7:in  
`run’

Any suggestions on how to get past this? (turning off transaction in  
the testing\_helper didn’t appear to have any affect.)

Thanks in advance,

Alan
