Please try with the latest beta and let me know if you're still seeing the
same issue. If so, send me the same stack trace as below but using beta1,
and I'll look into it.

https://rubygems.org/gems/haml/versions/3.2.0.beta.1

Regards,

Norman

On Mon, Jul 2, 2012 at 10:20 AM, Tim Diggins <[email protected]> wrote:

> Hi there -
>
> I posted a quesiton on stack overflow earlier, but wondered if maybe this
> is a better place to ask the question. I'm certainly stumped.
>
>
> The problem: nil rather than HamlBuffer (“undefined method
> `capture_position=' for nil:NilClass”)
>
> I got a weird exception on a live production server (running on heroku
> cedar stack ruby 1.9.2p290) where a page failed to render with a Nil being
> used where a haml buffer object was expected. The relevant method in haml is
>
> http://haml.info/docs/yardoc/Haml/Helpers.html#capture_haml-instance_method,
> which means that somehow haml's internal buffer is evaluating to nil rather
> than a haml buffer. I don't understand enough of haml internals to be able
> to work out how this might happen.
>
> More unusually, retrying the same page (using all the variations of
> context (logged in or not, etc) I can think of) I can't generate this
> error, so it seems to be a one-off (which is very weird, as this
> controller's action method has very little possible context).
>
> The line within the haml file which caused this error is doing a fairly
> typical rails form_tag
>
>     = form_tag my_controller_path do |f|
>
>       %p.inline-errors
>
>         = flash[:error]
>
>       %fieldset
>         %label{:for => "email"} Email
>
> In case it helps I'm running this on heroku (under 1.9.2 NOT 1.9.1 despite
> implication of stacktrace)
>
> stack trace follows
>
> MyController# (ActionView::Template::Error) "undefined method 
> `capture_position=' for nil:NilClass"
>
> /app/lib/core_extensions.rb:5:in `method_missing'
>
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers.rb:363:in 
> `ensure in capture_haml'
>
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers.rb:363:in 
> `capture_haml'
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers/xss_mods.rb:61:in
>  `capture_haml_with_haml_xss'
>
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers/action_view_mods.rb:93:in
>  `capture_with_haml'
>
> /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_view/helpers/form_tag_helper.rb:662:in
>  `form_tag_in_block'
> /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_view/helpers/form_tag_helper.rb:70:in
>  `form_tag'
>
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers/action_view_mods.rb:169:in
>  `form_tag_with_haml'
>
> /app/vendor/bundle/ruby/1.9.1/gems/haml-3.1.4/lib/haml/helpers/xss_mods.rb:122:in
>  `form_tag_with_haml_xss'
> /app/app/views/my_controller/new.html.haml:10:in 
> `_app_views_my_controller_new_html_haml__3224619017521789737_43773300'
>
> Any thoughts?
> thanks in advance
>
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/haml/-/YTWKyNn2PMAJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to