1

我在我的工作人员文件中包含一个文件时遇到问题......我需要做什么才能在排队工作时找到所需的文件?

这是错误:

/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- my_worker_helper (LoadError)
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /task/realtime_worker.rb:2:in `<top (required)>'
    from /task/runner.rb:343:in `require_relative'
    from /task/runner.rb:343:in `<main>'

这是代码:

require 'iron_worker'
require 'my_worker_helper'
require 'real_time_helper'

class RealtimeWorker < IronWorker::Base

    attr_accessor :team_list

    def run
4

2 回答 2

2
require 'iron_worker'

class RealtimeWorker < IronWorker::Base
  merge 'my_woker_helper.rb'
  merge 'real_time_helper.rb'
于 2012-04-24T19:21:21.010 回答
2

您将需要使用gemmerge提供的功能。iron_worker

有几个像:

  • 合并“文件”
  • 合并宝石'一​​些宝石'
  • 合并文件夹'目录'

更多信息:https ://github.com/iron-io/iron_worker_ruby/wiki/Merging

于 2012-04-25T06:57:28.073 回答