未初始化的常量ActiveRecord :: Base :: Delayed :: Job

时间:2013-05-18 04:53:44

标签: activerecord ruby-on-rails-4

我正在尝试将所有者字段添加到DelayedJob。我找到了这个SO answer showing a way to do it

但是当我按照那个答案中提到的那样进行编码时,在rails控制台中我做了

SomeArModel.new.jobs            

我收到此错误:

NameError: uninitialized constant ActiveRecord::Base::Delayed::Job

错误指向has_many

class ActiveRecord::Base
  has_many :jobs, :class_name => "Delayed::Job", :as => :owner
  ....

关于这里发生了什么以及如何解决它的任何想法?

0 个答案:

没有答案