Only get, head, post, put, and delete requests are allowed.

I got this error when I have to upgrade one old project from rails 1.2.5 to rails 2.1 (the problem is not in rails)

The exception:

I got this error only when I access URL’s with param like

http://127.0.0.1:3000/dod/images/show_big_image/1639

I found that the problem was in the :id because without the :id the method was called correctly

This means that there is something with the routes.

Not working routes.rb: ….

it will work if you swap the last two lines….

It seems that it does reading the comments in the routes.rb is usefull. There is written:

One Reply to “Only get, head, post, put, and delete requests are allowed.”

  1. thank you for post. it seems that position of routes must be from the most specified to less specified, in other words:

    /:this/should/precede
    /:this/another/route/:id

Comments are closed.