无法启动 resque worker

Cant start resque worker

我已经安装了 resque gem、gem install resque

然后我尝试启动 worker :

bundle exec rake environment resque:work

导致:

rake aborted!
Don't know how to build task 'resque:work' (see --tasks)

(See full trace by running task with --trace)

当我执行 rake -T 时没有出现重新请求任务,我这里哪里出错了?

  1. 你应该把 resque gem 放到 Gemfile 而不是直接安装它。

  2. Installation documentation (as of the time of writing) 说...

To start a worker, add this to a file in lib/tasks (ex: lib/tasks/resque.rake):

require 'resque/tasks'