Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails 3 Beta 3 label form helper causes "stack level too deep" exception

#4422

Forms perviously working in beta1/beta2 now throw a "stack level too deep" on any form containing a label. For example my Devise sign in form:

<% form_for resource_name, :as => resource, :url => session_path(resource_name) do |f| -%>
  <p><%= label_tag :email %></p>
  <p><%= f.text_field :email %></p>

Returns the error:

stack level too deep
Extracted source (around line #4):

1: <h2>Sign in</h2>
2: 
3: <% form_for resource_name, :as => resource, :url => session_path(resource_name) do |f| -%>
4:   <p><%= f.label :email %></p>

Reported by Hates_ · April 16th, 2010 @ 11:09 PM

State: resolved
Milestone: none
Assigned to: Ryan Bigg Ryan Bigg
Importance: none

Activity

  1. Hates_
    Hates_
    • Title changed from Beta 3 label form helper causes "stack level too deep" exception to Rails 3 Beta 3 label form helper causes "stack level too deep" exception

    April 17th, 2010 @ 12:40 AM

  2. Diego Carrion
    Diego Carrion

    This didn't happen with me. I created a new application, made an scaffold and everything was fine, even after installing Devise and trying again.

    Maybe a conflict with some gem or plugin?

    April 17th, 2010 @ 02:06 AM

  3. tcc
    tcc

    I'm seeing the same problem: http://groups.google.com/group/plataformatec-devise/browse_thread/t...

    I'm running on Mac OSX, ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]

    April 17th, 2010 @ 06:29 AM

  4. tcc
    tcc

    Copied stacktrace for more info:

    Started GET "/users/sign_up" for 127.0.0.1 at 2010-04-15 11:53:34
      Processing by Devise::RegistrationsController#new as HTML
    ActionView::Template::Error (stack level too deep) on line #6 of /
    Users/tcc/rails_3_devise/app/views/devise/registrations/new.html.erb:
    3: <%= form_for(resource, :as => resource_name, :url =>
    registration_path(resource_name)) do |f| %>
    4:   <%= devise_error_messages! %>
    5:
    6:   <p><%= f.label :email %></p>
    7:   <p><%= f.text_field :email %></p>
    8:
    9:   <p><%= f.label :password %></p>
    app/views/devise/registrations/new.html.erb:6:in `_render_template__160276350_2202163960_0'
    app/views/devise/registrations/new.html.erb:3:in
    `_render_template__160276350_2202163960_0'
    Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta3/lib/
    action_dispatch/middleware/templates/rescues/_trace.erb (2.4ms)
    Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta3/lib/
    action_dispatch/middleware/templates/rescues/_request_and_response.erb
    (521.2ms)
    Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta3/lib/
    action_dispatch/middleware/templates/rescues/template_error.erb within
    rescues/layo
    

    April 17th, 2010 @ 06:35 AM

  5. tetsuo692
    tetsuo692

    I have the same issue with an application create with rails 3.0.0.beta2.
    I update dependent gems with last version : "haml" "3.0.0.beta.3" and "mongoid", "2.0.0.beta3".
    And now everything works...

    April 17th, 2010 @ 07:21 AM

  6. Hates_
    Hates_

    After clearing out all my vendor gems, making sure I'm running the latest version of everything and doing a fresh "bundle install", this problem has gone away.

    Hopefully someone can close this bug.

    April 17th, 2010 @ 10:10 AM

  7. Mathias Kretschek
    Mathias Kretschek
    • Assigned user set to Ryan Bigg

    April 18th, 2010 @ 01:38 AM

  8. Lord Norlan Mumar
    Lord Norlan Mumar

    Experienced the same issue before, what I did I updated haml to version 2.2.23 (in Gemfile) and like Richard issued "bundle install", solved my problem.

    April 18th, 2010 @ 11:16 AM

  9. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to resolved

    April 18th, 2010 @ 11:44 PM