XML builder problems in console

1 view
Skip to first unread message

cult hero

unread,
Jun 30, 2009, 2:52:09 PM6/30/09
to Ramaze
I want to use XML builder in a Ramaze app I'm working on but... I'm
having issues that seem to be Ramaze related.

When I go into a regular old IRB and create an XmlMarkup object, I
get:

out = ""
=> ""
xml = Builder::XmlMarkup.new(target: out, indent: 2)
=> #<Builder::XmlMarkup:0x141f2c @indent=2, @level=0, @target="">

When I do the same thing from after running "ramaze console" I get:

out = ""
=> ""
xml = Builder::XmlMarkup.new(target: out, indent: 2)
NameError: uninitialized constant Builder::XmlBase::Symbol
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/builder-2.1.2/lib/builder/
xmlbase.rb:40:in `method_missing'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/ramaze-2009.06.12/lib/
ramaze/tool/bin.rb:146:in `run'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/ramaze-2009.06.12/bin/
ramaze:15:in `<top (required)>'
from /opt/local/bin/ramaze:19:in `load'
from /opt/local/bin/ramaze:19:in `<main>'

Anyone have any idea what gives?

Michael Fellinger

unread,
Jun 30, 2009, 10:01:36 PM6/30/09
to ram...@googlegroups.com

Builder is not compatible with Ruby 1.9, the rules for constant lookup
have changed.

--
Michael Fellinger
CTO, The Rubyists, LLC
972-996-5199

cult hero

unread,
Jun 30, 2009, 10:07:53 PM6/30/09
to Ramaze
Lameness. I'll have to look up the specifics on that and see if I can
patch it. (Or do without.) Thanks for your help! (And thanks to the
guys on IRC too.)

On Jun 30, 7:01 pm, Michael Fellinger <m.fellin...@gmail.com> wrote:

cult hero

unread,
Jun 30, 2009, 11:59:39 PM6/30/09
to Ramaze
One thing I forgot to ask...

Why does this work on its own but it breaks in Ramaze? Is something
causing some kind of a name clash or does it have to do with how
Ramaze loads things or what?

Both my IRB and Ramaze's console were running in Ruby 1.9 so the issue
seems to be a mixture of Ramaze and 1.9, but it can't be blamed
entirely on 1.9 because the code works when I'm not in Ramaze.
Reply all
Reply to author
Forward
0 new messages