Forum: Ruby Rails - MethodNotAllowed Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jayce M. (Guest)
on 2009-03-10 02:45
(Received via mailing list)
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:in
`recognize'
/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:in
`dispatch'
/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:in
`dispatch'
/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:in
`dispatch'
/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:in
`synchronize'
/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:in
`process_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:in
`process_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:in
`initialize'
/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:in `run'
/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:in `new'
/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:in
`run'
/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:in
`run'
/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:in
`run'
/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
Brian C. (Guest)
on 2009-03-11 14:49
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.
This topic is locked and can not be replied to.