我正在尝试运行以下代码:
# Resque tasks
require 'resque/tasks'
require 'resque_scheduler/tasks'
namespace :resque do
task :setup do
require 'resque'
require 'resque_scheduler'
require 'resque/scheduler'
# you probably already have this somewhere
Resque.redis = 'localhost:6379'
Resque.schedule = {}
require_relative 'app'
end
end
和 app.rb
require 'resque'
require 'resque_scheduler'
require 'resque/scheduler'
Resque.enqueue_in(5.days, SendFollowUpEmail, 'id')
但是我得到了 5:Fixnum 的未定义方法“天”
我找不到没有导轨的例子,知道吗?