Skip to content

Instantly share code, notes, and snippets.

@samgooi4189
Created April 3, 2018 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samgooi4189/b1c32943e13e392145a56c080021b9f4 to your computer and use it in GitHub Desktop.
Save samgooi4189/b1c32943e13e392145a56c080021b9f4 to your computer and use it in GitHub Desktop.
AbstractController::ActionNotFound: The action 'index' could not be found for
I am seeing this error after running rspec:
Failure/Error: raise ActionNotFound, "The action '#{action}' could not be found for #{self.class.name}"
AbstractController::ActionNotFound:
The action 'index' could not be found for Api::V1::ExpertSchedulesController
All other routes are not throwing error in the controller.
It is weird, because I already define index in routes.rb and inside the controller.
After an hour of debugging, I try to curl the API to see what is wrong.
Then the error pop out.
It is a typo of the Error class in rescue_from.
Therefore, if you see anything about 'index' action not found. You need to check your controller for typo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment