I'm trying to use delayed_job gem https://github.com/collectiveidea/delayed_job in Rails 3.2 to send a mail in the background.
I installed the gem
gem 'delayed_job_active_record'
I generated the table and ran the migrations, as instructed
$ rails generate delayed_job:active_record $ rake db:migrate
Noting that there are special instructions for mailers in Rails 3
# without delayed_job Notifier.signup(@user).deliver # with delayed_job Notifier.delay.signup(@user)
I did
def send_welcome_email #UserMailer.welcome_email(self).deliver <-- original code that worked UserMailer.delay.welcome_email(self) end
but the mail isn't sending. It was working before I tried to use delayed_job...
Can someone clarify for a novice...?