Search code examples
ruby-on-railsrubyresque

Cant start resque worker


I've installed resque gem, gem install resque.

And I tried to start the workers :

bundle exec rake environment resque:work

Resulting in :

rake aborted!
Don't know how to build task 'resque:work' (see --tasks)

(See full trace by running task with --trace)

When I do rake -T no resque tasks appear, what am I going wrong here?


Solution

    1. You should put the resque gem into the Gemfile instead of installing it directly.

    2. Installation documentation (as of the time of writing) says that...

    To start a worker, add this to a file in lib/tasks (ex: lib/tasks/resque.rake):

    require 'resque/tasks'