/usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:238:in `add_request_method': You should not use the `match` method in your router without specifying an HTTP method. (ArgumentError)
gzpol opened this issue · 0 comments
I have a problem for using mercury, those are the details, and I can't find the solution. Would you like to help me out?
rails g mercury:install
/usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:238:in add_request_method': You should not use the
matchmethod in your router without specifying an HTTP method. (ArgumentError) 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
getin the router: Instead of: match "controller#action" Do: get "controller#action" from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:124:in
initialize'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:78:in new' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:78:in
build'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:1560:in add_route' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:1537:in
decomposed_match'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:1518:in block in match' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:1508:in
each'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/mapper.rb:1508:in match' from /usr/local/rvm/gems/ruby-2.3.0/gems/mercury-rails-0.3.1/config/engine.rb:22:in
block in routes'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in instance_exec' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in
eval_block'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:412:in draw' from /usr/local/rvm/gems/ruby-2.3.0/gems/mercury-rails-0.3.1/config/engine.rb:21:in
routes'
from /var/www/html/g_text/config/routes.rb:2:in block in <top (required)>' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in
instance_exec'
from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in eval_block' from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:412:in
draw'
from /var/www/html/g_text/config/routes.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in
load'
from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in block in load' from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in
load_dependency'
from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in
block in load_paths'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in each' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in
load_paths'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:16:in reload!' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:26:in
block in updater'
from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in execute' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:27:in
updater'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:7:in execute_if_updated' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:69:in
block in module:Finisher'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in instance_exec' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in
run'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in block in run_initializers' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in
block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in
each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in
each'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in call' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in
each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in
tsort_each'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in run_initializers' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in
initialize!'
from /var/www/html/g_text/config/environment.rb:5:in <top (required)>' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:328:in
require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:328:in require_environment!' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:142:in
require_application_and_environment!'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:128:in generate_or_destroy' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:50:in
generate'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in run_command!' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in
<top (required)>'
from bin/rails:4:in require' from bin/rails:4:in