Ruby on rails heroku push拒绝,使用';匹配';方法,即使我正在使用';获取';
我是RubyonRails新手。我使用的是Rails 4.0.2 当我尝试将我的应用程序推送到heroku时,它会拒绝,并显示以下消息: 雷克流产了! 如果未指定HTTP方法,则不应在路由器中使用Ruby on rails heroku push拒绝,使用';匹配';方法,即使我正在使用';获取';,ruby-on-rails,heroku,ruby-on-rails-4,Ruby On Rails,Heroku,Ruby On Rails 4,我是RubyonRails新手。我使用的是Rails 4.0.2 当我尝试将我的应用程序推送到heroku时,它会拒绝,并显示以下消息: 雷克流产了! 如果未指定HTTP方法,则不应在路由器中使用match方法 If you want to expose your action to both GET and POST, add `via: [:get, :post]` option. If you want to expose your action to GET, use `ge
match
方法
If you want to expose your action to both GET and POST, add `via: [:get, :post]` option.
If you want to expose your action to GET, use `get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"
/tmp/build_e1d9b463-4a69-445b-b695-62ec1d8ef566/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:191:in `normal
“你的条件!”
/tmp/build_e1d9b463-4a69-445b-b695-62ec1d8ef566/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:67:in `initial
ize'
/tmp/build_e1d9b463-4a69-445b-b695-62ec1d8ef566/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:innew'
/tmp/build_e1d9b463-4a69-445b-b695-62ec1d8ef566/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:in
add\r
奥特
My routes.rb如下所示:
Agudasinthecity::Application.routes.draw do
root :to => 'pages#home'
get '/where', :to => 'pages#where'
get '/when', :to => 'pages#when'
get '/contact', :to => 'contact_us/contacts#new'
结束
有什么想法吗?尝试在每条路线的末尾添加via:“get”(根除外)