-
-
Save snatchev/1316470 to your computer and use it in GitHub Desktop.
❷ > QUEUE=* rake resque:work --trace | |
** Invoke resque:work (first_time) | |
** Invoke resque:preload (first_time) | |
** Invoke resque:setup (first_time) | |
** Execute resque:setup | |
** Execute resque:preload | |
rake aborted! | |
No such file to load -- devise/confirmations_controller | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:306:in `rescue in depend_on' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:301:in `depend_on' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:214:in `require_dependency' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:416:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:416:in `block in eager_load!' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:414:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:414:in `eager_load!' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/application/railties.rb:8:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/application/railties.rb:8:in `all' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/railties-3.1.1/lib/rails/engine.rb:412:in `eager_load!' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/resque-1.19.0/lib/resque/tasks.rb:47:in `block (2 levels) in <top (required)>' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' | |
/Users/stefan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in invoke_prerequisites' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:174:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain' | |
/Users/stefan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/rake-0.9.2/bin/rake:32:in `<top (required)>' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/bin/rake:19:in `load' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/bin/rake:19:in `<main>' | |
Tasks: TOP => resque:work => resque:preload |
Thanks for the tip - I just ran into this same issue and your fixes worked fine for me as well.
Yes - thanks a ton - worked great for me too.
THANKS.. oh thanks soo much.
Thank you for sharing this! For anyone else who comes across this, I changed this line:
ENV['QUEUE'] = '*'
to this:
ENV['QUEUE'] ||= '*'
That way I can still specify queue names from the command line if necessary, falling back to all queues otherwise.
@mhuggins, good idea. I've updated my initial comment with your suggestion.
thanks a lot!
yes !!!
it also work fine for me !!
Brilliant, thank you!
thaaaaaaaaaank you!!!!
@snatchev Brilliant, thank you!
Excellent! Saved me a whole bunch of time debugging...
thanks! was just running into this issue :)
👍 thanks
Works well. 😄 Thanks a lot.
This is an issue if you are adding Resque to a Rails app. As we know Resque does not require Rails. The solution allows you to load the entire Rails environment when you start up the workers. I did not see this issue when demoing Resque on a stand alone Ruby application.
And if you're using foreman, the corresponding syntax in your Procfile, that will also work, is
resque: bundle exec rake environment resque:work
In my case, I used .env to set my QUEUE environment variable:
QUEUE='*'
thank you for this!
This error was resolved, by running
$> QUEUE=* rake environment resque:work
a cleaner solution was to define a rake task:
and now
rake resque:work
works properly