small medium large xlarge

Generic-user-small
17 Nov 2008, 12:27
Phil MacGovern (3 posts)

Hi all

I am trying task G in B1.6 and I am having trouble getting the builder template to work correctly. When the who_bought.xml.builder template is called, I get

undefined local variable or method `xml’ for #

My understanding is that the “xml” variable is auto-magically created for you if the template is named “.xml.builder” (http://api.rubyonrails.org/classes/ActionView/Base.html). I have copied the code directly from the PDF. I have run “gem install builder”. I added what I thought to be missing “require ‘builder’” statements to the info controller. No luck. Any help?

Phil

Generic-user-small
28 Nov 2008, 11:15
Phil MacGovern (3 posts)

I restarted the entire book from scratch and ended up with the exact same error. Can anyone please help?

Generic-user-small
28 Nov 2008, 11:41
Phil MacGovern (3 posts)

I just figured it out - the .xml.builder file was saved as UTF-8 rather than ASCII.

You must be logged in to comment