I have in the directory /config/initializers/constants_data.rb following line:
ADM = User.find_by_name('admin').id
This is working me on localhost, but when I deploy the app to Heroku, I get the Application Error Error H10 (App crashed).
How can I avoid that?
It’s likely your admin user doesn’t exist.
In this case, you should always provide a fallback.
instead of