jejacks0n/mercury

/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

gzpol commented

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 thematchmethod in your router without specifying an HTTP method. (ArgumentError) If you want to expose your action to both GET and POST, addvia: [:get, :post]option. If you want to expose your action to GET, usegetin 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:ininitialize'
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:inbuild'
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:indecomposed_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:ineach'
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:inblock 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:ineval_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:inroutes'
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:ininstance_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:indraw'
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:inload'
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:inload_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:inblock 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:inload_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:inblock 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:inupdater'
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:inblock 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:inrun'
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:inblock 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:ineach_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:ineach'
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:ineach_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:intsort_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:ininitialize!'
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:inrequire'
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:inrequire_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:ingenerate'
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

'