Defect #5226

'can't typecast' in REST API for issues

Added by yusuke kokubo almost 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2010-03-31
Priority:NormalDue date:
Assignee:-% Done:


Category:REST API
Target version:-
Resolution:Duplicate Affected version:


I wrote this script.

require 'rubygems'
require 'active_resource'

class Issue < ActiveResource::Base = ''
  self.user = 'LOGIN'
  self.password = 'PASSWORD'

Issue.find(:all).each {|i| p i}

and got bellow;

C:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_
support/core_ext/hash/conversions.rb:182:in `typecast_xml_value': can't typecast
 "6253" (RuntimeError)
        from C:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.
5/lib/active_support/core_ext/hash/conversions.rb:208:in `typecast_xml_value'
        from C:/Program Files/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/custom_re
quire.rb:31:in `inject'

in my local redmine,
edit [app\views\issues\index.xml.builder]

- xml.issues :type => 'array', :count => @issue_count do
+ xml.issues :type => 'array' do

I can get issues without RuntimeError.

#sorry for my bad english...

Related issues

Duplicates Redmine - Defect #4745: Bug in index.xml.builder (issues) Closed 2010-02-05


#1 Updated by yusuke kokubo almost 8 years ago

Ruby enviroment is...



ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-mswin32]
Rails 2.3.5
OS Windows XP pro

#2 Updated by Eric Davis almost 8 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate of #4745

Also available in: Atom PDF