On 12 February 2011 11:17, Salil Gaikwad
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> Hi All,
>
> I have upgrade my Rails to 2.3.8 and Ruby to 1.8.6. I have managed to
> start my existing application but when I am clicking on any link on the
> page, it give me error "stack level too deep" with following
stacktrace:
>
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:98:in
> `flush''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:96:in
> `synchronize''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:96:in
> `flush''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:116:in
> `auto_flush''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:65:in
> `add''
>
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/buffered_logger.rb:72:in
> `debug''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract_adapter.rb:198:in
> `log_info''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/query_cache.rb:78:in
> `cache_sql''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in
> `select_all''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in
> `select_one''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in
> `select_value''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/calculations.rb:237:in
> `execute_simple_calculation''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/calculations.rb:134:in
> `calculate''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/calculations.rb:130:in
> `catch''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/calculations.rb:130:in
> `calculate''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/calculations.rb:48:in
> `count''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/associations/has_many_association.rb:36:in
> `count_records''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/associations/association_collection.rb:276:in
> `size''
>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/associations/association_collection.rb:295:in
> `empty?''
> /home/Hemant/CVSFolder/DashGo-2.2.0/app/models/artist.rb:144:in
> `artwork''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/artists/_artist_view.html.erb:58:in
>
`_run_erb_app47views47artists47_artist_view46html46erb_locals_artist_view_object''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/artists/_artist_panel.html.erb:19:in
>
`_run_erb_app47views47artists47_artist_panel46html46erb_locals_artist_panel_object_post''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:24:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
/home/Hemant/CVSFolder/DashGo-2.2.0/app/views/layouts/application.html.erb:32:in
> `_run_erb_app47views47layouts47application46html46erb''
>
> with last line repeated hundreds of times.
>
> I tried running application on ruby 1.8.7 and rails 2.3.5, 2.3.8, 2.1.0.
> I observed that, application is running fine on rails version earlier
> than 2.2.x. The main error line
> "app/views/layouts/application.html.erb:32" has <%= yeild
%> statement.
> If I comment it, everything works fine. I am not able to get the exact
> issue.
I presume it is just a typo in your post that you have yeild rather
than yield. It sounds as if the yield is yielding to itself in some
way so that it keeps repeating the yield till it runs out of stack.
Have you worked out where it is supposed to be yielding to? You could
use ruby-debug to break into the view code and see what is happening
if you cannot see the problem by inspection. Have a look at the Rails
Guide on debugging if you have not used ruby-debug.
Colin
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.