Rails - MethodNotAllowed Error


#1

Hello all,

I'm sorry, I'm having issues subscribing to the Rails mailing list, 

so I’m hoping someone here will be able to help me. Below is an error I
continuously get whilst using Rails, however I do not know the cause…
The error description seems simple enough, but I have yet to identify
what is actually causing it. Can anyone help me?

  • Jayce
    ActionController::MethodNotAllowed
    Only get, head, post, put, and delete requests are allowed.RAILS_ROOT:
    /home/school/etc/rails_apps/main

/usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in
recognize_path' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:inrecognize’
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in
handle_request' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:indispatch’
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in
synchronize' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:indispatch’
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in
dispatch_cgi' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:indispatch’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:76:in
process' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:insynchronize’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:in
process' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:159:inprocess_client’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in each' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:inprocess_client’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in run' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:ininitialize’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in new' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:inrun’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in
initialize' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:innew’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in run' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:282:inrun’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:281:in
each' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:281:inrun’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in
run' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/command.rb:212:inrun’
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load’
/usr/bin/mongrel_rails:19


#2

Jayce M. wrote:

I'm sorry, I'm having issues subscribing to the Rails mailing list, 

Try joining groups.google.com, as this is very specifically a problem
you’re having with Rails.

Only get, head, post, put, and delete requests are allowed.RAILS_ROOT:
/home/school/etc/rails_apps/main

/usr/lib64/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in
`recognize_path’

There’s very good info there. If you don’t understand why it is doing
this, add some debugging lines of the form

STDERR.puts “foo = #{foo.inspect}”

around the point where the error is being raised as required. Rails
makes this sort of debugging especially easy by allowing you to ‘freeze’
the current version into your project, so you can make local
modifications without touching the system version.