延迟作业轨道 3 未定义的方法'up'



我试图从几个月前使用Rails 3.0.7复活一个项目。

我之前推迟了工作,但现在我更新了我的宝石,当我尝试和enqueue一些东西时,我得到以下错误。

NoMethodError (undefined method up' for:null:Symbol): '

这行代码是:

Delayed::Job.enqueue DelayedXlsExport.new(@email, timestamp, filename)

DelayedXlsExport是:

class DelayedXlsExport < Struct.new(:email, :timestamp, :filename)  
  def perform
    ....
  end
end

这是堆栈的一部分:

activessupport (3.0.10) lib/active_support/callback .rb:415:in_run_create_callbacks' activerecord (3.0.10) lib/active_record/callbacks.rb:277:in创建activeecord (3.0.10)lib/active_record/持久性。rb:257:在create_or_update' activerecord (3.0.10) lib/active_record/callbacks.rb:273:in块中Create_or_update ' activessupport (3.0.10)lib/active_support/回调。b: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/持久性。rb:40:在save' activerecord (3.0.10) lib/active_record/validations.rb:43:in保存' activerecord (3.0.10)lib/active_record attribute_methods/脏。rb:21:在save' activerecord (3.0.10) lib/active_record/transactions.rb:240:in块(2级)中保存"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/交易。更新transaction' activerecord (3.0.10) lib/active_record/transactions.rb:290:in with_transaction_returning_status' activerecord (3.0.10)lib/active_record/交易。r: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/交易。在save' activerecord (3.0.10) lib/active_record/base.rb:504:in创建' 'C:/dev/Ruby/Ruby192/lib/Ruby/珠宝/1.9.1/打包机/珠宝/delayed_job-8efc2aa99e8b/lib/延迟/后端/base.rb: 28:"排队"

My gem file:

gem "delayed_job", :branch => 'v2.1', :git => 'git://github.com/collectiveidea/delayed_job.git'

有什么想法吗?

更新workless gem修复此问题

gem 'workless', '0.2.0'

相关内容

最新更新