Search code examples
ruby-on-railssidekiqairbrake

Ruby on Rails sidekiq with airbrake setup


What are correct steps to setup sidekiq to work with airbrake on ruby on rails application.

already did:

  1. add gem 'airbrake' to gemfile
  2. add gem 'airbrake' to gemfile
  3. bundle install
  4. rails generate airbrake --my_api_key
  5. Create file sidekiq.rb with content:

Sidekiq.configure_server do |config| config.error_handlers << Proc.new { |ex,ctx_hash| Airbrake.notify_or_ignore(ex, ctx_hash) } end

What are the next steps to make it work?


Solution

  • require 'airbrake/sidekiq/error_handler'