Я получаю сообщение об ошибке при попытке запустить мое приложение рельсы через rails s
:неинициализированные постоянная Resque :: Помощники при запуске рельсов сервер
/Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/resque-scheduler-2.0.1/lib/resque/scheduler.rb:9:in `<class:Scheduler>': uninitialized constant Resque::Helpers (NameError)
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/resque-scheduler-2.0.1/lib/resque/scheduler.rb:7:in `<module:Resque>'
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/resque-scheduler-2.0.1/lib/resque/scheduler.rb:5:in `<top (required)>'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:81:in `require'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:81:in `rescue in block in require'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:66:in `block in require'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/nils/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/nils/Uni/Masterarbeit/TweetTracker/config/application.rb:7:in `<top (required)>'
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Users/nils/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Я использую Rails 4 с Руби 1.9.3. В моей Gemfile:
gem 'resque', "~> 2.0.0.pre.1", github: "resque/resque"
gem 'resque-scheduler'
И соответствующий инициализаторе:
# reestablish DB connection for the forked process within each job
Resque.after_fork do
ActiveRecord::Base.establish_connection
resque_config = YAML.load_file(Rails.root.join("config", "resque.yml"))
Resque.redis = resque_config[Rails.env]
end
# load resque config
resque_config = YAML.load_file(Rails.root.join("config", "resque.yml"))
Resque.redis = resque_config[Rails.env]
Dir[Rails.root.join("app", "jobs", "*.rb")].each { |file| require file }
require 'resque'
require 'resque/server'
# Load resque-scheduler schedule
require 'resque_scheduler'
require 'resque_scheduler/server'
Resque.schedule = YAML.load_file(Rails.root.join("config", "schedule.yml"))
Я понятия не имею, что делать здесь. :/