Delayed Job Rails 3 undefined method 'up'
I'm trying to resurrect a project from a few months ago using Rails 3.0.7.
I had delayed job working on it previously, but now Ive updated my gems I get the following error when I try and enqueue
something.
NoMethodError (undefined method
up' for :null:Symbol):`
The line of code is:
Delayed::Job.enqueue DelayedXlsExport.new(@email, timestamp, filename)
DelayedXlsExport is:
class DelayedXlsExport < Struct.new(:email, :timestamp, :filename)
def perform
....
end
end
And here is part of the stack:
activesupport (3.0.10) lib/active_support/callbacks.rb:415:in
_run_create_callbacks' activerecord (3.0.10) lib/active_record/callbacks.rb:277:in
create' activerecord (3.0.10) lib/active_record/persistence.rb:257:increate_or_update' activerecord (3.0.10) lib/active_record/callbacks.rb:273:in
block in create_or_update' activesupport (3.0.10) lib/active_support/callbacks.rb:419:in_run_save_callbacks' activerecord (3.0.10) lib/active_record/callbacks.rb:273:in
create_or_update' activerecord (3.0.10) lib/active_record/persistence开发者_C百科.rb:40:insave' activerecord (3.0.10) lib/active_record/validations.rb:43:in
save' activerecord (3.0.10) lib/active_record/attribute_methods/dirty.rb:21:insave' activerecord (3.0.10) lib/active_record/transactions.rb:240:in
block (2 levels) in save' activerecord (3.0.10) lib/active_record/transactions.rb:292:inblock in with_transaction_returning_status' activerecord (3.0.10) lib/active_record/connection_adapters/abstract/database_statements.rb:139:in
transaction' activerecord (3.0.10) lib/active_record/transactions.rb:207:intransaction' activerecord (3.0.10) lib/active_record/transactions.rb:290:in
with_transaction_returning_status' activerecord (3.0.10) lib/active_record/transactions.rb:240:inblock in save' activerecord (3.0.10) lib/active_record/transactions.rb:251:in
rollback_active_record_state!' activerecord (3.0.10) lib/active_record/transactions.rb:239:insave' activerecord (3.0.10) lib/active_record/base.rb:504:in
create' C:/dev/Ruby/Ruby192/lib/ruby/gems/1.9.1/bundler/gems/delayed_job-8efc2aa99e8b/lib/delayed/backend/base.rb:28:in `enqueue'
My gem file:
gem "delayed_job", :branch => 'v2.1', :git => 'git://github.com/collectiveidea/delayed_job.git'
Any ideas here?
Updating the workless gem fixed this issue
gem 'workless', '0.2.0'
精彩评论