undefined方法`scaler ='用于#<class:0x00000003aa6a10>(NoMethodError)无法工作的延迟作业</class:0x00000003aa6a10>

时间:2014-07-30 10:52:28

标签: ruby-on-rails heroku delayed-job autoscaling

我正在使用以下宝石自动缩放heroku上的worker。

````
   gem "workless", "1.1.1"
   gem "delayed_job",         "2.0.7"
   gem "rails", "~>2.3"
````
In production.rb, I have added the below code
````
   config.after_initialize do
    p Delayed::Job
    Delayed::Job.scaler = :heroku
   end
````
But after starting the rails server I am getting the below error. .

````
   Delayed::Backend::ActiveRecord::Job(id: integer, priority: integer, attempts: integer, handler: text, last_error: text, run_at: datetime, locked_at: datetime, failed_at: datetime, locked_by: string, created_at: datetime, updated_at: datetime)
`method_missing': undefined method `scaler=' for #<Class:0x00000003aa6a10> (NoMethodError)

````

请帮我解决这个问题。

0 个答案:

没有答案