rake ts:dd - 未初始化的常量延迟::作业

时间:2012-02-01 17:13:12

标签: ruby-on-rails delayed-job thinking-sphinx

我按照thinking sphinx website上的说明使用延迟作业插件设置延迟增量。

所有似乎都安装正确,但是当我第一次'ts:dd'时,我明白了:

rake ts:dd --trace
** Invoke ts:dd (first_time)
** Invoke thinking_sphinx:delayed_delta (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Execute thinking_sphinx:delayed_delta
rake aborted!
uninitialized constant Delayed::Job
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/plugins/clear_locks.rb:9:in `ensure in block (2 levels) in <class:ClearLocks>'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/plugins/clear_locks.rb:9:in `block (2 levels) in <class:ClearLocks>'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:78:in `call'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:60:in `call'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:60:in `block in initialize'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:78:in `call'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:78:in `block in add'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:65:in `call'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:65:in `execute'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/lifecycle.rb:38:in `run_callbacks'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/delayed_job-3.0.1/lib/delayed/worker.rb:111:in `start'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/ts-delayed-delta-1.1.2/lib/thinking_sphinx/deltas/delayed_delta/tasks.rb:11:in `block (2 levels) in <top (required)>'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/darcbar/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/darcbar/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/bin/rake:19:in `load'
/home/darcbar/.rvm/gems/ruby-1.9.2-p290@rails310/bin/rake:19:in `<main>'
Tasks: TOP => ts:dd => thinking_sphinx:delayed_delta

我已安装:

Sphinx 0.9.9
thinking_sphinx 2.0.10
ts-delayed-delta 1.1.2

1 个答案:

答案 0 :(得分:5)

对于延迟作业3,您需要安装一个后端gem,例如delayed_job_active_record用于activerecord后端。