I am getting
$ rake routes rake aborted! ArgumentError: Missing :action key on routes definition, please check your routes. /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:243:in `default_controller_and_action' /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:117:in `normalize_options!' /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:65:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:1487:in `new' /usr/local/r................
Here is my Routes.rb
Rails.application.routes.draw do get 'script/index' get 'landing/index' root 'landing/index' end
What is causing the problem and how do I fix it.
The Rails router recognizes URLs and dispatches them to a controller's action. The error is caused by missing out the mapped action.
Rails.application.routes.draw do # url action get 'script/index' => 'script#index' get 'landing/index' => 'landing#index' root 'script#index' end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With