Ruby 2.5.1
MySQL 5.6.47

After deploying to heroku, an error occurs and the application cannot be opened.
The deployment method was done with reference to the following links.
Heroku deployment

When you open the page after deployment
Error screen
Was displayed.

Applicable source code
heroku run rails c

I checked the log at. Then

undefined local variable or method `session' for RegistrationsController:Class (NameError)

Was displayed.
So I checked RegistrationsController.

class RegistrationsController

I thought that the session part was strange, but there was no difference from the reference material,
I didn't know what was wrong.
Reference material

What I tried

I was wondering if I should define a session, but I don't know how to do it,
I haven't been able to try it.

  • Answer # 1

    I commented out the RegistrationsController and it worked fine.

Related articles