使用脚本/delay_job创建delayed_job工作程序时发生未定义的方法错误 [英] Undefined Method Error when creating delayed_job workers with script/delay_job
问题描述
运行多个工作程序时遇到问题.
Having a bit of a problem running multiple workers.
使用rake jobs:work
作业创建工作程序时,即使没有多次调用,运行也不会出现问题,但是使用ruby script/delayed_job -n 5 start all
作业创建工作程序时,由于在Syck::DomainType
上使用未定义的方法而失败.
When creating workers with rake jobs:work
jobs run without and problem, even when invoking it multiple times, but when creating workers with ruby script/delayed_job -n 5 start all
jobs fail with undefined method on Syck::DomainType
.
我已经搜索了很多,但是似乎找不到解决方案.我在Mongoid后端上运行DelayedJob.宝石版本:
I've searched quite a bit, but can't seem to find the solution for this. I am running DelayedJob on the Mongoid backend. Gem versions:
- 0.9.2耙
- rails 3.0.6
- delayedjob 2.1.4
- delayedjob_mongoid 1.0.2
有人遇到类似的错误/有解决方案吗?还是缺少一些信息,说明为什么/如何根据调用工人的方式来不同地创建工人?
Has anyone experienced a similar error/have a solution? Or short of that some information on why/how workers are being created differently depending on which way they are invoked?
推荐答案
问题似乎出自捆绑程序> = 1.0.10,如果存在libyaml,则加载psych并覆盖一些sycks功能.我能够从系统中删除libyaml安装,但我知道并非所有人都能做到.很难追踪,希望这篇文章能对其他人有所帮助
It looks like the problem was derived from bundler >= 1.0.10 loading up psych and overwriting some of sycks functionality if libyaml is present. I was able to remove the libyaml install from my system, something that I know won't be possible for everyone. Tough to track down, hopefully this post will help someone else
这篇关于使用脚本/delay_job创建delayed_job工作程序时发生未定义的方法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!