Post returns 405 method not allowed

前端 未结 3 1840
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 02:01

I am having an issue with my Rails localhost Server, all Post calls started returning 405 method not allowed. However there are no problems on our staging and production

3条回答
  •  感动是毒
    2021-02-19 02:37

    Could you post your routes file and also the exact rails version of your dev-environment and the production servers?

    I assume this could happen when you post to a route that is only registered as a get request (depending on your rails version) or maybe routes that are defined twice, e.g.:

    resources :photos, :only => [:index]
    get :photos
    

提交回复
热议问题