The following errors appears when I try to run rails console in production. (In development mode it works as expected)
bin$ RAILS_ENV=production ./rails c
/home/ubuntu/app/shared/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:509:in `load_missing_constant': Circular dependency detected while autoloading constant AdminUser (RuntimeError)
My AdminUser contains the following:
class AdminUser < ApplicationRecord
devise :database_authenticatable,
:recoverable, :rememberable, :trackable, :validatable
end