1

I am trying to add devise dependency in my gem. By adding

gem.add_dependency "devise"

and Include modules :database_authenticatable, :confirmable, :registerable, :recoverable, :rememberable, :trackable, :lockable, :validatable

While running specs from my gem to create user, it throws "uninitialized constant Devise::Mailer".

Please help me

Nikhil D
  • 99
  • 1
  • 1
  • 4

1 Answers1

0

As mentioned in the Devise wiki, How to use Devise Inside a Mountable Engine:

…add the following line to your lib/name_of_engine.rb:

require 'devise'

Otherwise, the Devise::Engine does not initialize within your engine/gem.

Mars
  • 1,530
  • 10
  • 15