-
Notifications
You must be signed in to change notification settings - Fork 2
Rails error: Routing Error: uninitialized constant
Sean Lerner edited this page Apr 12, 2017
·
3 revisions
If your error looks like ...
Routing Error
uninitialized constant ProductsController
... then rails can't find the controller being routed to.
Check your app/controllers folder. If you don't see a file for your controller, then use the rails generator to create a controller. For example, from your command line:
rails generate controller products
Replace products with the controller you desire. Note that you likely need to ensure that your controller name is pluralized.
This is a living document. If you have anything to add, change or remove, please let us know. Or better yet, as it's a wiki, make the change yourself!