Rake route Error “Missing :action key on routes definition”

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

Leave a Comment