嘿,我们有一个调用延迟作业的库类(lib/Mixpanel),如下所示:
class Mixpanel
attr_accessor :options
attr_accessor :event
def track!()
..
dj = send_later :access_api # also tried with self.send_later
..
end
def access_api
..
end
问题是,当我们运行 rake jobs:work: 时,会出现以下错误:
undefined method `access_api' for #<YAML::Object:0x24681b8>
知道为什么吗?