devise-async 0.3.0 not working with devise 2.1.2 #9

Closed
fjyaniez opened this Issue Aug 7, 2012 · 6 comments

3 participants

@fjyaniez

Hi,

I have configured the devise-async gem as follows:

# config/initializers/devise_async.rb
Devise::Async.backend = :delayed_job
Devise::Async.queue = :mailers
# app/models/user.rb
# [...]
  devise :database_authenticatable, :registerable, :token_authenticatable, :confirmable,
         :recoverable, :rememberable, :trackable, :validatable, :session_limitable

  include Devise::Async::Model # should be below call to `devise`
# [...]

I'm using delayed_job 3.0.3 (delayed_job_active_record 0.3.2). The problem is no job is created and no email is sent. For example, when I try to recover password:

Started POST "/es/users/password" for 127.0.0.1 at 2012-08-07 10:45:41 +0200
Processing by Devise::PasswordsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"WFaaUqoCZewV9o/V+T6rXYAof32YizuXNGk0jujCG6I=", "user"=>{"email"=>"test@test.com"}, "commit"=>"Solicitar instrucciones", "locale"=>"es"}
  User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`email` = 'test@test.com' LIMIT 1
Redirected to http://localhost:3000/es/sign_in
Completed 302 Found in 29ms (ActiveRecord: 0.0ms)


Started GET "/es/sign_in" for 127.0.0.1 at 2012-08-07 10:45:41 +0200
Processing by Devise::SessionsController#new as HTML
  Parameters: {"locale"=>"es"}
   (0.1ms)  BEGIN
   (0.1ms)  COMMIT
  Rendered devise/_links.html.haml (1.6ms)
  Rendered devise/sessions/new.html.haml within layouts/application (30.4ms)
Completed 200 OK in 161ms (Views: 156.0ms | ActiveRecord: 0.4ms)

How can I debug what's happening?

Thank you.

@fjyaniez

By the way, version 0.2.0 is working fine, so I guess the problem is this new 0.3.0 version hasn't been tested.

How can I help resolving this?

@denniskuczynski

@fjyaniez You may be hitting this known issue: #7

@fjyaniez

@denniskuczynski I read your pull request and the code you changed, but I think it's a different problem. The issue i'm facing is the notifications are never created using devise-async 0.3.0 and delayed_job.

@mhfs
Owner

@fjyaniez I believe @denniskuczynski might be right. I just merged his pull request. Would you please give a try against master? Thanks!

@fjyaniez

@mhfs it worked, thank you very much!

@fjyaniez fjyaniez closed this Aug 8, 2012
@mhfs
Owner

Great! Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment