stack level too deep in Rails 2.3.5

300 Views Asked by At

I am getting an error like this

Exception Traces:


 --> stack level too deep

 --> /var/www/html/mysite.com/mysiteweb/mysite/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb:86:in `include?'
 --> /var/www/html/mysite.com/mysiteweb/mysite/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb:86:in `first_column_to_exist'
 --> /var/www/html/mysite.com/mysiteweb/mysite/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb:86:in `each'

Not sure why this is happening. Searched a lot and found that many has got this error. But not sure why this is happening.

My authlogic plugin version 2.1.6

I get this same error in different scenarios

--> stack level too deep

--> /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
--> /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
--> /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'

In another case its like:

Exception Traces:
-----------------
 --> ActionView::TemplateError (stack level too deep) on line #39 of app/views/users/view.html.erb:
 36:             <% if table_exists?(subform.form_type.tableize) %>
 37:               <% if (current_user and (current_user.id.to_i == @user.id.to_i or user_permission(current_user.id, 7).to_i == 1 or user_permission(current_user.id, 7).to_i == 2 or user_permission(current_user.id, 7).to_i == 3)) or (current_kiosk_user != nil) %>
 38:                 <% unless @subforms_user_info[subform] %>
 39:                   <%= render_component :controller => subform.form_type.tableize, :action => "new", :params => {"user_id" => @user.id.to_s, "form_id" => subform.parent_id.to_s, "layout" => "false", :subform_id => subform.id.to_s} %>
 40:                 <% else %>
 41:                   <%= render_component :controller => subform.form_type.tableize, :action => "edit", :id => @subforms_user_info[subform].id.to_s, :params => {"user_id" => @user.id.to_s, "form_id" => subform.parent_id.to_s, "layout" => "false", :subform_id => subform.id.to_s} %>
 42:                 <% end %>

     app/controllers/application_controller.rb:34:in `current_user_session'
     app/controllers/application_controller.rb:34:in `send'
     app/controllers/application_controller.rb:34:in `current_user_session'
     app/controllers/application_controller.rb:40:in `current_user'
     app/controllers/application_controller.rb:138:in `handle_exception'
     app/controllers/application_controller.rb:12:in `__bind_1331263727_565111'
     exceptional (2.0.32) lib/exceptional/integration/rails.rb:14:in `rescue_action'
     app/views/users/view.html.erb:39
     app/views/users/view.html.erb:10:in `each'
     app/views/users/view.html.erb:10
     app/controllers/users_controller.rb:690:in `view'

Can anyone please explain the root cause of this issue. I am not able to figure it out, what exactly is the cause for this.

1

There are 1 best solutions below

0
On

You get this exception when there's infinite recursion, most likely. You should check your code for that.