[英]“undefined method” error when running delayed_jobs in multiple queues with ./script/delayed_job -n
Having a problem with running delayed jobs in multiple queues. 在多个队列中运行延迟作业时遇到问题。 I had the same problem at the beginning when I ran all in one queue with 当我在一个队列中运行时,我在开始时遇到了同样的问题
rake jobs:work
But solved it by running 但是通过跑步解决了它
bundle exec rake jobs:work.
Now for running different queues, I'm using: ./script/delayed_job -n 2 start 现在运行不同的队列,我正在使用:./ script / delayed_job -n 2 start
and back to start with the error. 然后回到错误开始。 The error is: 错误是:
"Syck::DomainType#{method_name} failed with NoMethodError: undefined method `{method_name}' for # “Syck :: DomainType#{method_name}失败,NoMethodError:未定义方法`{method_name}'for#
I have tried to resolve it by adding the code to application.rb as suggested here : 我试图通过添加代码application.rb中的建议来解决它在这里 :
require 'yaml'
YAML::ENGINE.yamler = 'syck'
# [...]
require File.expand_path('../boot', __FILE__)
But it didn't help. 但它没有帮助。 I'm using: Rails 3.0.9 Ruby 1.9.2 p290 我正在使用:Rails 3.0.9 Ruby 1.9.2 p290
Thanks :) Moozly. 谢谢:) Moozly。
well, try 我们会尽力
bundle exec ./script/delayed_job -n 2 start
;) ;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.