All, I have a builder (.rxml) file that creates a new builder using: xml = Builder::XmlMarkup.new(:indent => 2) When I attempt to render it, I get this exception: uninitialized constant ActionView::TemplateHandlers::Builder::XmlMarkup so clearly Builder::XmlMarkup moved out from under ActionView::TemplateHandlers. I looked at the directory structure in both 2.0.2 and 2.1.0 ActionPack gems and I can''t figure out what''s so different. Where did Builder::XmlMarkup go and how do I bring it in? Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---
On Jun 12, 10:08 pm, Wes Gamble <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> All, > > I have a builder (.rxml) file that creates a new builder using: > > xml = Builder::XmlMarkup.new(:indent => 2) > > When I attempt to render it, I get this exception: > > uninitialized constant > ActionView::TemplateHandlers::Builder::XmlMarkup >does ::Builder::XmlMarkup work ? Fred> so clearly Builder::XmlMarkup moved out from under > ActionView::TemplateHandlers. > > I looked at the directory structure in both 2.0.2 and 2.1.0 ActionPack > gems and I can''t figure out what''s so different. > > Where did Builder::XmlMarkup go and how do I bring it in? > > Thanks, > Wes > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes! So how come Builder is now a root level module and not available through ActionView::TemplateHandlers? Wes -- 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 -~----------~----~----~----~------~----~------~--~---
On 12 Jun 2008, at 22:51, Wes Gamble wrote:> > Yes! > > So how come Builder is now a root level module and not available > through > ActionView::TemplateHandlers? >Because it always was at the root level. ActionView was significantly refactored in 2.1; IIRC, TemplateHandler didn''t exist before 2.1, so there was no ActionView::TemplateHandlers::Builder. Now there is one and since you''re in the context of a TemplateHandler, ruby thinks that Builder means ActionView::TemplateHandlers::Builder (which is the TemplateHandler that allows you to write view with builder (much as there are handlers that allow you to use, erb, rjs etc....) which is a complete separate thing to Builder (as provided by the builder library). Fred> Wes > -- > 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 -~----------~----~----~----~------~----~------~--~---
> Because it always was at the root level. ActionView was significantly > refactored in 2.1; IIRC, TemplateHandler didn''t exist before 2.1, so > there was no ActionView::TemplateHandlers::Builder. Now there is one > and since you''re in the context of a TemplateHandler, ruby thinks that > Builder means ActionView::TemplateHandlers::Builder (which is the > TemplateHandler that allows you to write view with builder (much as > there are handlers that allow you to use, erb, rjs etc....) which is a > complete separate thing to Builder (as provided by the builder library). > > FredThat makes sense. Is this a bug then? Should Builder::XmlMarkup be moved into a new package given this namespace collision? Wes -- 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 -~----------~----~----~----~------~----~------~--~---
On 12 Jun 2008, at 23:23, Wes Gamble wrote:> >> Because it always was at the root level. ActionView was significantly >> refactored in 2.1; IIRC, TemplateHandler didn''t exist before 2.1, so >> there was no ActionView::TemplateHandlers::Builder. Now there is one >> and since you''re in the context of a TemplateHandler, ruby thinks >> that >> Builder means ActionView::TemplateHandlers::Builder (which is the >> TemplateHandler that allows you to write view with builder (much as >> there are handlers that allow you to use, erb, rjs etc....) which >> is a >> complete separate thing to Builder (as provided by the builder >> library). >> >> Fred > > That makes sense. > > Is this a bug then? > > Should Builder::XmlMarkup be moved into a new package given this > namespace collision?While it''s unfortunate (and it''s hard to foresee all combinations like this) I see this as namespacing working as it should. it would be more than a little odd to rename the builder library because of some rails implementation detail :-) Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---