How to find the source "SystemStackError (stack level too deep)" in Rails 3.2

I am migrating from Rails 3.0 to 3.2.

I have an error when I try to render a page using just this little stacktrace:

SystemStackError in UserController#show stack level too deep SystemStackError (stack level too deep): activesupport (3.2.1) lib/active_support/callbacks.rb:415 Rendered /home/barbacan/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (55.3ms) Rendered /home/barbacan/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (4.0ms) Rendered /home/barbacan/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (61.4ms) 

The magazine is not detailed.

This problem occurs in callbacks: this is dynamic code, and it is difficult to debug.

Do you know tools or methods that will help me debug and find the source of this problem?

Thanks!

EDIT:

Is there a way in Ruby / RoR to list all methods called as a list?

+8
debugging ruby ruby-on-rails
source share
1 answer

You can use Pry and railscast http://railscasts.com/episodes/280-pry-with-rails , then you can set a breakpoint in a likely place and perform manual control.

+4
source share

All Articles