开发者

Delayed Job Rails 3 undefined method 'up'

开发者 https://www.devze.com 2023-04-11 20:00 出处:网络
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 s

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 methodup' 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:increate' activerecord (3.0.10) lib/active_record/persistence.rb:257:in create_or_update' activerecord (3.0.10) lib/active_record/callbacks.rb:273:inblock 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:in save' activerecord (3.0.10) lib/active_record/validations.rb:43:insave' activerecord (3.0.10) lib/active_record/attribute_methods/dirty.rb:21:in save' activerecord (3.0.10) lib/active_record/transactions.rb:240:inblock (2 levels) in save' activerecord (3.0.10) lib/active_record/transactions.rb:292:in block 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:in transaction' 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:in block 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:in save' activerecord (3.0.10) lib/active_record/base.rb:504:increate' 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'

0

精彩评论

暂无评论...
验证码 换一张
取 消