NoMethodError: undefined method `setup'for Devise: Module

Prerequisites

--PaaS related settings such as AWS have been completed --SQL is already implemented --Deploy to Heroku

Error statement


rake aborted!
       NoMethodError: undefined method `setup' for Devise:Module

Conclusion

Write gem'devise' in the production environment, not in the group develop test

Cause

In the repository config/environment, there are rb files for production, deveropment, and test, and if you enclose the gem in a group, the gem cannot be used in production.rb.

Recommended Posts

NoMethodError: undefined method `setup'for Devise: Module
RSpec error resolution undefined method `feature'for RSpec: Module
undefined method `** _ path'error
[Ruby on Rails] NoMethodError undefined method `devise_for'error resolution
[Rails] devise helper method
[Rails Tutorial] "NoMethodError (undefined method` activation_digest ='for # <User: 0x00000003156938>
[Rails] devise introduction method