简体   繁体   English

使用./script/delayed_job -n在多个队列中运行delayed_jobs时出现“undefined method”错误

[英]“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.

相关问题 PGError:错误:关系“delayed_jobs”不存在(Postgresql,rails 3.04,delayed_job错误) - PGError: ERROR: relation “delayed_jobs” does not exist (Postgresql, rails 3.04, delayed_job error) 使用 script/delay_job 创建delayed_job 工作者时出现未定义的方法错误 - Undefined Method Error when creating delayed_job workers with script/delay_job delay_jobs错误,nil:NilClass的未定义方法“电子邮件” - delayed_jobs error, undefined method `email' for nil:NilClass 为什么delay_job在delay_jobs表中记录了不正确的时间戳? - Why is delayed_job recording an incorrect time stamp in the delayed_jobs table? ActiveJob使用delay_job不会在测试中创建delay_jobs行 - ActiveJob using delayed_job does not create delayed_jobs row in test Delayed_job:在任何调用上未定义的方法错误 - Delayed_job: Undefined method error on any call 未定义的局部变量或delay_job的方法 - undefined local variable or method for delayed_job Rails-在sh脚本上运行delay_job - Rails - running delayed_job on sh script Phusion为main:具有delay_jobs的对象抛出未定义的方法'Struct' - Phusion throws undefined method `Struct' for main:Object with delayed_jobs delay_job: 使用 handle_asynchronously 时出现“未定义方法”错误 - delayed_job: 'undefined method' error when using handle_asynchronously
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM