bradphelan wrote:
>     /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
> core_ext/array/conversions.rb:163:in `to_xml': Not all elements
> respond to to_xml (RuntimeError)

Indeed: ActiveSupport is trying to call to_xml on each element of the 
array, and failing.

>> require 'rubygems'
=> true
>> require 'active_support'
=> true
>> {}.to_xml
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n</hash>\n"
>> 1.to_xml
NoMethodError: undefined method `to_xml' for 1:Fixnum
  from (irb):4

> Any way to get this working?

Googling "rails to_xml", the second hit is
http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html
I also found
http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M001207

This suggests it's only intended for use with ActiveRecord objects and 
collections of ActiveRecord objects, but you may need to dig further 
into the code. Perhaps have a look at ActiveResource.

However, these are all parts of Rails, and Rails questions are best 
asked in a Rails forum.
-- 
Posted via http://www.ruby-forum.com/.