2

所以我将我的管理员邮件转换为使用 Resque 并在后台执行。

当我跑的时候:

rake resque:work QUEUE='*' --trace

我明白了:

$ rake resque:work QUEUE='*' --trace (in /my/directory)
** Invoke resque:work (first_time)
** Invoke resque:preload (first_time)
** Execute resque:preload rake aborted! undefined method `paginates_per' for #<Class:0x000000045ba1b8>

这可以追溯到我的 Micropost 模型,该模型使用 kaminari 的 dsl 方法 paginates_per 默认为每页 10 个 micropost:

class Micropost < ActiveRecord::Base
.
.
.
  paginates_per 10

如何在不移动 DSL 方法的情况下让 rake 停止呕吐?

4

0 回答 0