TemplateError

I have an error in my unicorn log... Traces:

Error during failsafe response: ActionView::Template::Error
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:11:in
`block in render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/abstract_renderer.rb:22:in
`wrap_formats'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:9:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/renderer.rb:36:in
`render_template'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/renderer.rb:17:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/helpers/rendering_helper.rb:24:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb:9:in
`__home_hosting_molclub__gem_ruby_______gems_actionpack_______lib_action_dispatch_middleware_templates_rescues_diagnostics_erb__469302486263488482_34255540'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/template.rb:171:in
`block in render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/notifications.rb:55:in
`instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/template.rb:169:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:40:in
`block (2 levels) in render_template'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/abstract_renderer.rb:33:in
`block in instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53:in
`block in instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/notifications/instrumenter.rb:21:in
`instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53:in
`instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/abstract_renderer.rb:33:in
`instrument'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:39:in
`block in render_template'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:47:in
`render_with_layout'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:38:in
`render_template'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:12:in
`block in render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/abstract_renderer.rb:22:in
`wrap_formats'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:9:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/renderer.rb:36:in
`render_template'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/renderer.rb:17:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/helpers/rendering_helper.rb:24:in
`render'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/show_exceptions.rb:89:in
`rescue_action_locally'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/show_exceptions.rb:69:in
`render_exception'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/show_exceptions.rb:59:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/railties-3.1.3/lib/rails/rack/logger.rb:13:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/rack-1.3.6/lib/rack/methodoverride.rb:24:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/rack-1.3.6/lib/rack/runtime.rb:17:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/rack-1.3.6/lib/rack/lock.rb:15:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/middleware/static.rb:53:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:456:in
`call'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in
`method_missing'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:530:in
`process_client'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:604:in
`worker_loop'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:487:in
`spawn_missing_workers'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:137:in
`start'
/home/hosting_molclub/.gem/ruby/1.9.1/gems/unicorn-4.2.0/bin/unicorn_rails:209:in
`' /home/hosting_molclub/.gem/ruby/1.9.1/bin/unicorn_rails:19:in `load'
/home/hosting_molclub/.gem/ruby/1.9.1/bin/unicorn_rails:19:in `'

And there is 'stack level too deep' in the rails logs.

What have I do?

You have a recursive loop in your code somewhere. Can you tell
anything from the log before the failure? That should tell you what
it was trying to render. Perhaps you have a partial calling itself or
something like that. If you cannot see it then possibly remove chunks
from the view until the problem goes away.

Colin

Colin Law wrote in post #1044304:

I have an error in my unicorn log... Traces:

Error during failsafe response: ActionView::Template::Error

/home/hosting_molclub/.gem/ruby/1.9.1/gems/actionpack-3.1.3/lib/action_view/renderer/template_renderer.rb:11:in

`block in render'
...'

And there is 'stack level too deep' in the rails logs.

What have I do?

You have a recursive loop in your code somewhere. Can you tell
anything from the log before the failure? That should tell you what
it was trying to render. Perhaps you have a partial calling itself or
something like that. If you cannot see it then possibly remove chunks
from the view until the problem goes away.

Colin

I'm trying to migrate from 3.0 to 3.1. I didn't change some code yet.
Only Gemfile, and bundle install. It's strange there are no my files in
the trace...

It would have been useful to know that first time round. I don't know
the answer in that case. If it happens for a particular view then
again you could simplify the view to find out the trouble. I presume
you have already googled for the error with rails 3.1 in the search,
and so on.

Colin

Colin Law wrote in post #1044312:

Sorry I don't understand that sentence, could you rephrase it please?

Colin

Colin Law wrote in post #1044315:

I hope you are using RVM to help to manage gems and rails versions.
If not then I strongly suggest that you do.

Colin

Colin Law wrote in post #1044336:

Let me just check - this is happening with a new rails 3.1.3 app
created by rails 3.1.3 and with no extra code or gems specified in
Gemfile?
Have you editted the gemfile at all?

Colin

Colin Law wrote in post #1044341:

Some more questions
When does the error happen?
How are you starting the server?
What version of Ruby are you using?
Which OS?
Can you post your Gemfile and gemfile.lock.

Colin

Colin Law wrote in post #1044347:

Are you sure that is the Gemfiile produced for a new app created by
Rails 3.1.3, it seems to have some extra stuff in it compared to mine,
for example russian, jquery-rails, ruby\ip enum_column3 therubyracer
v8 etc, etc.

You said that you had not editted the gemfile at all after making a new app.

Colin

Colin Law wrote in post #1044358:

Sorry but I am fast running out of patience, you said you see the
problem on a new app. What exact problem do you see on a new app? If
you see a problem with a new app then post exact error seen and the
Gemfile and the lock file for that (just paste them in the message
don't mess about with attachments.

Colin