Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 4 routing error with will_filter #60

Open
PrabhakarUndurthi opened this issue Feb 27, 2015 · 2 comments
Open

Rails 4 routing error with will_filter #60

PrabhakarUndurthi opened this issue Feb 27, 2015 · 2 comments

Comments

@PrabhakarUndurthi
Copy link

In my route.rb file I've
resources :risks # Line 25
get '/update_via_issue_id', to: 'risks#update_via_issue_id'
post '/update_risk_via_issue_id', to: 'risks#update_risk_via_issue_id'

When I start rails server it is throwing this error. Wondering wheter will_filter 3.1 is compatability with rails 4 or not.

Exiting
.../gems/actionpack-4.2.0/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 .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:124:ininitialize'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:78:in new' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:78:inbuild'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:1559:in add_route' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:1536:indecomposed_match'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:1517:in block in match' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:1507:ineach'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:1507:in match' from .../gems/will_filter-3.1.11/config/routes.rb:25:inblock in <top (required)>'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:601:in instance_exec' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:601:inblock in with_default_scope'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:816:in scope' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:600:inwith_default_scope'
from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:421:in eval_block' from .../gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:indraw'
from .../gems/will_filter-3.1.11/config/routes.rb:24:in <top (required)>' from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:inload'
from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in block in load' from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:inload_dependency'
from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in load' from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inblock in load_paths'
from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in each' from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inload_paths'
from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in reload!' from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:inblock in updater'
from .../gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in call' from .../gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:inexecute'
from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in updater' from .../gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:inexecute_if_updated'
from .../gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in block in <module:Finisher>' from .../gems/railties-4.2.0/lib/rails/initializable.rb:30:ininstance_exec'
from .../gems/railties-4.2.0/lib/rails/initializable.rb:30:in run' from .../gems/railties-4.2.0/lib/rails/initializable.rb:55:inblock in run_initializers'
from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:150:in block in tsort_each' from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:183:inblock (2 levels) in each_strongly_connected_component'
from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:219:in each_strongly_connected_component_from' from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:182:inblock in each_strongly_connected_component'
from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:180:in each' from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:180:ineach_strongly_connected_component'
from /home/prabhakar/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/tsort.rb:148:in tsort_each' from .../gems/railties-4.2.0/lib/rails/initializable.rb:54:inrun_initializers'
from .../gems/railties-4.2.0/lib/rails/application.rb:352:in initialize!' from .../gems/railties-4.2.0/lib/rails/railtie.rb:194:inpublic_send'
from .../gems/railties-4.2.0/lib/rails/railtie.rb:194:in method_missing' from /home/prabhakar/optimus/config/environment.rb:20:in<top (required)>'
from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in require' from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:inblock in require'
from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in load_dependency' from .../gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:inrequire'
from /home/prabhakar/optimus/config.ru:3:in block in <main>' from .../gems/rack-1.6.0/lib/rack/builder.rb:55:ininstance_eval'
from .../gems/rack-1.6.0/lib/rack/builder.rb:55:in initialize' from /home/prabhakar/optimus/config.ru:innew'
from /home/prabhakar/optimus/config.ru:in <main>' from .../gems/rack-1.6.0/lib/rack/builder.rb:49:ineval'
from .../gems/rack-1.6.0/lib/rack/builder.rb:49:in new_from_string' from .../gems/rack-1.6.0/lib/rack/builder.rb:40:inparse_file'
from .../gems/rack-1.6.0/lib/rack/server.rb:299:in build_app_and_options_from_config' from .../gems/rack-1.6.0/lib/rack/server.rb:208:inapp'
from .../gems/railties-4.2.0/lib/rails/commands/server.rb:61:in app' from .../gems/rack-1.6.0/lib/rack/server.rb:336:inwrapped_app'
from .../gems/railties-4.2.0/lib/rails/commands/server.rb:139:in log_to_stdout' from .../gems/railties-4.2.0/lib/rails/commands/server.rb:78:instart'
from .../gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in block in server' from .../gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:intap'
from .../gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in server' from .../gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
from .../gems/railties-4.2.0/lib/rails/commands.rb:17:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

@seuros
Copy link

seuros commented Feb 27, 2015

This gem is unmaintained

@prathees
Copy link

prathees commented Jan 5, 2017

using the latest master branch from this repo resolved this issue for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants