ActionController::MethodNotAllowed Only get, put, and delete requests are allowed.

Hi.
I have seen the same problem in this forum, but the solution isn't
work in my case.I'm developing with Netbeans 6.9.1 with SO Windows
Vista. I'm using Rails 2.3.8 and Mogrel 1.1.5.

Part in the code of [b]routes.rb[/b] is:

ActionController::Routing::Routes.draw do |map|
     map.desactivateapis 'apis/
desactivateapis', :controller=>'apis', :action=>'desactivateapis'

The file [b]apis_controller.rb[/b] contains:

class ApisController < ApplicationController
def desactivateapis
  @apis = params[:putinactive]
    if @apis
      for a in @apis
        @api = Api.find(a)
        @api.isactive=false
        @api.save
      end
    end
end
end

And finally the view file [b]desactiveapis.rb[/b] is:

<%= error_messages_for :api %>
<% form_tag(@api) do |f| %>
    <%= t("start.users.introdesactivateapis")%><br></br>
    <% cont=0%>
    <%Api.find(:all).each do|a| %>
      <%if a.isactive==true %>
        <% cont=cont+1%>
        <%= check_box_tag 'putinactive[]', a.id %>
        <%=a.name%><br></br>
     <%end%>
   <%end %>
   <%if cont==0%>
        <%=t("start.users.noactiveapis")%><br></br>
   <%end %>
<%= submit_tag t("start.users.select"), :confirm =>
t("start.users.sure") %>
<%end%>

The full trace of the error is:

C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/routing/
recognition_optimisation.rb:64:in `recognize_path'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:
442:in `recognize'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:
437:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:87:in
`dispatch'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:121:in
`_call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:130:in
`build_middleware_stack'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/query_cache.rb:29:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/query_cache.rb:29:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/
query_cache.rb:34:in `cache'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/query_cache.rb:9:in `cache'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/query_cache.rb:28:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/
connection_pool.rb:361:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/string_coercion.rb:25:in
`call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/params_parser.rb:15:in
`call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/session/cookie_store.rb:
99:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/failsafe.rb:26:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:114:in
`call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/reloader.rb:34:in `run'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:108:in
`call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rails-2.3.8/lib/rails/rack/static.rb:31:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/urlmap.rb:49:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rails-2.3.8/lib/rails/rack/log_tailer.rb:17:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in `process'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:159:in `process_client'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in `each'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in `process_client'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `run'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `initialize'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `new'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `run'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in `initialize'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in `new'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/mongrel-1.1.5-java/lib/mongrel.rb:268:in `run'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in `run'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rails-2.3.8/lib/commands/server.rb:111
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/
gems/rails-2.3.8/lib/commands/server.rb:31:in `require'
C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/site_ruby/
1.8/rubygems/custom_require.rb:31:in `require'
script\server:3

I have a list of names with a check box, I select something and I
click in the submit, everythig is ok and it's shown the same page
without the names previously selected. If now, I repeat the process:
select some check box and click in the submit, the explained error is
generated.

I haven't been able to fix this error and I've searched in google for
some days.

Thank you.
Margo