Defect #10803
Updated by Jean-Philippe Lang over 12 years ago
The api docs (http://www.redmine.org/projects/redmine/wiki/Rest_Versions#PUT) say you should be able to update existing versions with PUT but when I try it, I get an error 405 that says "Only get and post requests are allowed.". allowed.": <pre> status=405, <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Action Controller: Exception caught</title> <style> body { background-color: #fff; color: #333; } body, p, ol, ul, td { font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; } pre { background-color: #eee; padding: 10px; font-size: 11px; } a { color: #000; } a:visited { color: #666; } a:hover { color: #fff; background-color:#000; } </style> </head> <body> <h1> ActionController::MethodNotAllowed </h1> <pre>Only get and post requests are allowed.</pre> <p><code>RAILS_ROOT: C:/Program Files/BitNami Redmine Stack/apps/redmine</code></p> <div id="traces"> <a href="#" onclick="document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Application-Trace').style.display='block';; return false;">Application Trace</a> | <a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='block';; return false;">Framework Trace</a> | <a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='block';; return false;">Full Trace</a> <div id="Application-Trace" style="display: block;"> <pre><code></code></pre> </div> <div id="Framework-Trace" style="display: none;"> <pre><code>C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/recognition_optimisation.rb:64:in `recognize_path' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:442:in `recognize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:437:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:87:in `dispatch' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:121:in `_call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:9:in `cache' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:28:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/head.rb:9:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/methodoverride.rb:24:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/params_parser.rb:15:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/session/cookie_store.rb:99:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/failsafe.rb:26:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `synchronize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:106:in `call' C:/Program Files/BitNami Redmine Stack/apps/redmine/config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:27:in `dispatch' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:76:in `process' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `synchronize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `process' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:159:in `process_client' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `each' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `process_client' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `initialize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `new' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `initialize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `new' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:282:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `each' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:128:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/command.rb:212:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281 C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19:in `load' C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19</code></pre> </div> <div id="Full-Trace" style="display: none;"> <pre><code>C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/recognition_optimisation.rb:64:in `recognize_path' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:442:in `recognize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:437:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:87:in `dispatch' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:121:in `_call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:9:in `cache' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:28:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/head.rb:9:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/methodoverride.rb:24:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/params_parser.rb:15:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/session/cookie_store.rb:99:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/failsafe.rb:26:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `synchronize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in `call' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:106:in `call' C:/Program Files/BitNami Redmine Stack/apps/redmine/config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:27:in `dispatch' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:76:in `process' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `synchronize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/rails.rb:74:in `process' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:159:in `process_client' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `each' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in `process_client' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `initialize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `new' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `initialize' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `new' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:282:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `each' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/configurator.rb:281:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:128:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel/command.rb:212:in `run' C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/mongrel_rails:281 C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19:in `load' C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19</code></pre> </div> </div> <h2 style="margin-top: 30px">Request</h2> <p><b>Parameters</b>: <pre>{"version"=>{"status"=>"closed", "name"=>"1016"}}</pre></p> <p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p> <div id="session_dump" style="display:none"><pre class='debug_dump'>--- </pre></div> <h2 style="margin-top: 30px">Response</h2> <p><b>Headers</b>: <pre>{"Cache-Control"=>"no-cache", "Content-Type"=>"", "Allow"=>"GET, POST"}</pre></p> </body> </html> Traceback (most recent call last): File "C:/Temp/RedmineMigration/close_old_versions.py", line 26, in <module> raise RuntimeError RuntimeError Process finished with exit code 1 </pre>