There is a ticket http://code.whytheluckystiff.net/markaby/ticket/5
which is perhaps related. Try applying the patch?
Vish
On 11/10/06, Joe Ruby MUDCRAP-CE
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> I''ve also posted this to the Camping (no response to my latest)
and core
> (hasn''t shown up) lists, but want to see if anybody here might
have any
> insights. :)
>
> Trying to use Rails'' caching with Markaby, I get errors like this:
>
> ActionView::TemplateError
> (/usr/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:192:in
> `method_missing'': no such method `length'') on line #0 of
> app/views/items/index.mab:
> 1:
> 2: cache("#{@site.server_name}/index_items") do
>
> Tim replied:
>
> Yep, the length error is because a lot of Rails''
> internals still assume ERB, which uses a different buffer structure
> to Markaby. I''ll try to get it working soon.
>
> And I replied:
>
> Do you have any ideas how to approach it? Looking at
> Rails'' code:
>
> # Called by CacheHelper#cache
> def cache_erb_fragment(block, name = {}, options
> = nil)
> unless perform_caching then block.call; return
> end
>
> buffer = eval("_erbout", block.binding)
>
> if cache = read_fragment(name, options)
> buffer.concat(cache)
> else
> pos = buffer.length
> block.call
> write_fragment(name, buffer[pos..-1],
> options)
> end
> end
>
> It seems like Markaby might have to have a "length"
> attribute and/or act like "buffer"? Or would Rails
> need to be changed on the eval line?
>
>
> Anybody have any ideas on getting caching working with Markaby?
>
> Thanks,
> Joe
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---