I try to use delayed_job for heroku and I get the following error:
Cannot enqueue items which do not respond to perform
I am using the http://github.com/pedro/delayed_job plugin
I am using the following cron rake task (cron.rake):
task :cron => :environment do require 'heroku' puts "starting the cron job at #{Date.today}" heroku = Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASS']) heroku.set_workers(ENV['HEROKU_APP'], 1) Contact.all.each do |contact| email = contact.email_today
This is the email program I use:
class OutboundMailer < Postage::Mailer def campaign_email(contact,email) subject email.subject recipients contact.email from 'Me <me@me.com>' sent_on Date.today body :email => email end
Question: Why am I getting an error message and what can I do to solve it?
ruby-on-rails heroku delayed-job
Angela
source share