I ran into this error while implementing a "Like" button using Rails.
The cause is that when I made my own like controller, I wrote it as likes.controller.rb.
The correct answer was likes_controller.rb.
Small mistakes can lead to errors, so don't panic and take action one by one.