resque-scheduler icon indicating copy to clipboard operation
resque-scheduler copied to clipboard

LoadError: No such file to load -- MY_APP_sessions_controller

Open fuminori-ido opened this issue 10 years ago • 0 comments

When I run "rake resque:work" under resque-scheduler, the following error happens:

$ rake --trace resque:work
** Invoke resque:work (first_time)
** Invoke resque:preload (first_time)
** Invoke resque:setup (first_time)
** Execute resque:setup
** Execute resque:preload
rake aborted!
LoadError: No such file to load -- MY_APP_sessions_controller
/usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
/usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:312:in `depend_on'
/usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:225:in `require_dependency'
...

This is similar to https://github.com/resque/resque/issues/1235 and this is fixed by adding the followings at lib/tasks/resque.rake:

...
namespace :resque do
  task setup: :environment do
  ...

resque-scheduler README.md "Rake integration" section looks wrong. If so, could you fix it?

$ uname -a
Linux ... 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-linux]

$ grep resq Gemfile.lock 
    resque (1.25.2)
    resque-scheduler (3.0.0)
      resque (~> 1.25)
  resque
  resque-scheduler

fuminori-ido avatar Oct 08 '14 01:10 fuminori-ido