2011-08-31 2 views
-1

REST API를 활성화 한 상태에서 여기에서 작업중인 프로젝트에 Redmine 서버를 설치했습니다 : http://zqwjs.se.rit.edu/redmine. 그러나, 내가 redmine 서버 (http://zqwjs.se.rit.edu/redmine/issues.xml)에 issues.xml 파일이 나타나는지 테스트 할 때 빈 페이지가 나타납니다. 누구든지 오류없이 REST API를 호출 할 수 있도록 redmine 구성을 수정해야하는 방법에 대한 제안 사항이 있습니까?Redmine REST API를 호출하여 모든 문제점 가져 오기 : 406 오류?

NOTE: Gem::Specification#default_executable= is deprecated with no replacement. 
It will be removed on or after 2011-10-01. 
Gem::Specification#default_executable= called from C:/Ruby187/lib/ruby/gems/1.8/ 
specifications/rubygems-update-1.8.2.gemspec:11. 
C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_resource/conne 
ction.rb:145:in `handle_response': Failed. Response code = 406. Response messa 
ge = Not Acceptable. (ActiveResource::ClientError) 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/connection.rb:114:in `request' 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/connection.rb:79:in `get' 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/connection.rb:217:in `with_auth' 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/connection.rb:79:in `get' 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/base.rb:857:in `find_every' 
     from C:/Ruby187/lib/ruby/gems/1.8/gems/activeresource-3.0.9/lib/active_r 
esource/base.rb:777:in `find' 
     from redmine-interact.rb:10 

답변

0

내가하지 않아도 :

주 : 콘솔에서

require 'rubygems' 
require 'active_resource' 

# Issue model on the client side 
class Issue < ActiveResource::Base 
    self.site = 'http://zqwjs.se.rit.edu/redmine/' 
end 

# Retrieving issues 
issues = Issue.find(:all) 
print issues 

인쇄물 : 내 레드 마인 서버에 대해 다음 루비 코드를 실행 한 경우, 나는 다시 406 오류가 발생합니다 이 문제는 버전 1.2.1에서 발생합니다. 당신의 정확한 코드는 설치 과정에서 잘 작동하기 때문에 Issue REST API에 내장되어 있지 않은 Redmine의 이전 버전을 사용하고 있다고 가정합니다.

+0

방금 ​​설치를 확인했습니다. 서버에서 1.2.0을 실행 중입니다. 문제에 대한 REST API 지원이 1.0에서 추가 된 것 같아서이 문제는 Redmine의 버전과 관련이 없다고 생각합니다. – jds2501

+0

그런 경우, REST API를 사용하도록 설정 한 이후로 서버를 다시 시작하지 않은 것이 가장 좋습니다. http://zqwjs.se.rit.edu/redmine/projects.xml과 같은 다른 모든 XML도 작동하지 않는 것으로 나타났습니다. 그 외에는 아이디어가 없습니다. 이것은 오류 로그를 검사하고 소스를 파고 issue 컨트롤러에'printf' 출력을 추가하는 지점입니다. 예외를 볼 수 있도록 Webrick을 사용하여 개발 모드에서 앱을 실행할 수 있습니까? –

+0

그냥 버전이 잘못 읽혔다는 것을 깨달았습니다. 설치가 실행 된 것은 0.9.3으로 REST API가 작동하지 않는 이유를 설명합니다. 도와 주셔서 감사합니다! – jds2501