I have a rails application that works perfectly on development environment but crashes on index page in production, only when there is a record present on the resource.
When there is no record present, the same index page renders just fine. There are no changes on production.log, weirdly enough, even when navigating through the application.
Keep in mind that just the index page crashes, other areas of the application are still accessible when navigating through the url. Also, the resource's new action is able to save and persist the data.
The production server is set up with puma and nginx. There are also no error on Nginx's log, and access log shows proper redirection of the request to the application.
Nginx's access log:
I have also tried to run the application on local environment in production mode, but it crashes on the first login page.
Upon speculation that i might have messed up on i18n setup, I tried to run the application by first removing i18n from the application and secondly by re-configuring i18, both of which didn't present any changes to the problem.
There are no any complicated calculations on index method of controllers of all three resource. I am simply returning all the records in an instance variable, that's it.
I am using RoR-6