Skip to content

Getting Started

willcodeforfoo edited this page Feb 9, 2012 · 77 revisions

Sidekiq makes every effort to make usage with Rails 3 applications as simple as possible. sidekiq does not support Rails 2.x.

Rails 3.x

  1. Add sidekiq to your Gemfile:

    gem 'sidekiq'
    
  2. Add a worker in app/workers to process messages asynchronously:

    class HardWorker include Sidekiq::Worker def perform(name, count) # do something end end

  3. Send a message to be processed asynchronously:

    HardWorker.perform_async('bob', 5)

  4. Start sidekiq from the root of your Rails application so the message will be processed:

    sidekiq

Plain Old Ruby

Sidekiq currently requires a Rails 3 app because it provides worker code loading and a set of conventions I can plug into. I'd love to support plain Ruby apps but need feedback on how to solve these needs. If you have ideas, please open an issue and we'll discuss.

Clone this wiki locally