Project

General

Profile

Actions

Defect #11564

closed

ArgumentError when rendering any XML

Added by Vladimir Dzalbo over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I moved a system from 1.3 to latest 2.0 stable version and ran into a strange problem: seem not to be able to render any XML messages.

First noticed it while trying to render list of Projects via REST API

http://192.168.100.6:3000/sys/projects.xml?key=KEY

In the log file I see

Started GET "/sys/projects.xml?key=KEY" for 192.168.100.121 at Wed Aug 01 18:17:43 +0200 2012
Processing by SysController#projects as XML
  Parameters: {"key"=>"KEY"}
  Setting Load (1.8ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'sys_api_enabled' LIMIT 1
  Setting Load (0.7ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'sys_api_key' LIMIT 1
  SQL (3.1ms)  SELECT `projects`.`id` AS t0_r0, `projects`.`name` AS t0_r1, `projects`.`description` AS t0_r2, `projects`.`homepage` AS t0_r3, `projects`.`is_public` AS t0_r4, `projects`.`parent_id` AS t0_r5, `projects`.`created_on` AS t0_r6, `projects`.`updated_on` AS t0_r7, `projects`.`identifier` AS t0_r8, `projects`.`status` AS t0_r9, `projects`.`lft` AS t0_r10, `projects`.`rgt` AS t0_r11, `projects`.`customer_id` AS t0_r12, `repositories`.`id` AS t1_r0, `repositories`.`project_id` AS t1_r1, `repositories`.`url` AS t1_r2, `repositories`.`login` AS t1_r3, `repositories`.`password` AS t1_r4, `repositories`.`root_url` AS t1_r5, `repositories`.`type` AS t1_r6, `repositories`.`checkout_settings` AS t1_r7, `repositories`.`path_encoding` AS t1_r8, `repositories`.`log_encoding` AS t1_r9, `repositories`.`extra_info` AS t1_r10, `repositories`.`identifier` AS t1_r11, `repositories`.`is_default` AS t1_r12 FROM `projects` LEFT OUTER JOIN `repositories` ON `repositories`.`project_id` = `projects`.`id` AND is_default = 1 WHERE (projects.status = 1) AND (projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')) ORDER BY projects.identifier
Completed 500 Internal Server Error in 223ms

ArgumentError (wrong number of arguments (1 for 0)):
  app/controllers/sys_controller.rb:28:in `projects'

Later on I also noticed rendering XML list issues does not work as well..

DEPRECATION WARNING: Passing the format in the template name is deprecated. Please pass render with :formats => [:atom] instead. (called from realtime at /usr/lib/ruby/1.8/benchmark.rb:308)
  Rendered common/feed.atom.builder (4.4ms)
Completed 500 Internal Server Error in 184ms

ActionView::Template::Error (wrong number of arguments (1 for 0)):
    1: xml.instruct!
    2: xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
    3:   xml.title   truncate_single_line(@title, :length => 100)
    4:   xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
  app/views/common/feed.atom.builder:1:in `_app_views_common_feed_atom_builder___1526667617_69924712181380'
  app/controllers/application_controller.rb:349:in `render_feed'
  app/controllers/issues_controller.rb:87:in `index'
  app/controllers/issues_controller.rb:82:in `index'

Would be grateful for any advice.

Environment:
Redmine version 2.0.3.stable.10149
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.6
Environment production
Database adapter MySQL

Actions #1

Updated by Vladimir Dzalbo over 12 years ago

  • Status changed from New to Resolved

Solved it by updating ruby to 1.9.3

Apparently it's a conflict of 1.8 ruby and 3.2 Rails

Actions #2

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from Resolved to Closed

Redmine runs fine with 1.8 and 3.2. Maybe a builder issue, what was the version of your builder gem?

Actions

Also available in: Atom PDF