k.harishankars
sad I’m confused

ActiveResource Client throws error

Hey,

So I tried the ActiveResource client from the http://www.pivotaltracker.com/help/ap...

and the below is my simple code, I had set my "my_proj_id" and "my_token" properly.

require 'rubygems'
require 'activeresource'
class Story < ActiveResource::Base
self.site = "http://www.pivotaltracker.com/service..."
headers['X-TrackerToken'] = ''
end

Story.find(:all)

The error it throws:
/home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:182:in `typecast_xml_value': can't typecast "307" (RuntimeError)
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:208:in `block in typecast_xml_value'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:207:in `each'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:207:in `inject'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:207:in `typecast_xml_value'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:164:in `from_xml'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activeresource-2.3.5/lib/active_resource/formats/xml_format.rb:19:in `decode'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activeresource-2.3.5/lib/active_resource/connection.rb:138:in `get'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activeresource-2.3.5/lib/active_resource/base.rb:639:in `find_every'
from /home/victoria7/.rvm/gems/ruby-1.9.1-p378/gems/activeresource-2.3.5/lib/active_resource/base.rb:582:in `find'
from pivotal_story.rb:10:in `'

Has this got something to do with the xml data that comes as part of the response?

I did search for this error in the existing topics but could not find one. Sorry if it is an already answered one and do point me to the topic.

Thanks for all help!
6 people have
this problem
+1
Reply