devise-async icon indicating copy to clipboard operation
devise-async copied to clipboard

sidekiq + devise confirmable, undefined method on devise_mailer for nil

Open ChrisCPO opened this issue 9 years ago • 1 comments

Im using rspec for testing, rails 4.2.1 devise 3.5.3 user.send_confirmation_instructions is returning:

     NoMethodError:
       undefined method `devise_mailer' for nil:NilClass
sidekiq.yml

---
:concurrency: 5
:pidfile: tmp/pids/sidekiq.pid
staging:
  :concurrency: 10
production:
  :concurrency: 20
:queues:
  - default
  - mailer
  - [myqueue, 2]

devise_async.rb

Devise::Async.backend = :sidekiq
Devise::Async.enabled = true
Devise::Async.queue = :default

I have tried :mailer as well.
user.rb

  devise :database_authenticatable, :registerable, :confirmable,
         :recoverable, :rememberable, :trackable, :validatable, :async

This seems like an config/ internal issue. I have followed the guides. What could I possibly be missing?

ChrisCPO avatar Apr 26 '16 20:04 ChrisCPO

Even I faced it for first time but I have kept queue to my custom queue, after setting it to default & restart solved that. You can try to clear cache also.

swapnilchincholkar avatar Oct 04 '16 13:10 swapnilchincholkar