This project is archived and is in readonly mode.
Nil output buffer in capture helper
Reported by rap-kasta | February 21st, 2010 @ 04:58 PM
I found this bug while tried to make own copy of edge rails guides, so..
Problem is:
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_view/helpers/capture_helper.rb:147:in
with_output_buffer': undefined method
encoding' for
nil:NilClass (NoMethodError)
If see on the code:
buf.force_encoding(output_buffer.encoding) if
buf.respond_to?(:force_encoding)
but output_buffer is nil!
For me, I add a dirty hack that did the work:
class NilClass
def encoding
"utf-8"
end
end
I think, output_buffer must be defined before work with it...
Comments and changes to this ticket
-
Rohit Arondekar February 2nd, 2011 @ 10:15 AM
- State changed from new to stale
- Importance changed from to Low
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>