finds.dev← search

// the find

lardawge/carrierwave_backgrounder

★ 737 · Ruby · updated Mar 2026

Offload CarrierWave's image processing and storage to a background process using ActiveJob or Sidekiq.

A Rails gem that moves CarrierWave's post-cache work into an ActiveJob or Sidekiq job, so an upload request no longer waits on image processing or a remote storage push. It suits Rails apps already on CarrierWave that have started timing out on avatar or photo uploads. The maintainer has stopped active maintenance, so treat it as a finished snapshot that will not get new fixes.

The two modes are separated by what they do to the file. store_in_background hands the already-cached file to a job without reprocessing it, and process_in_background handles the versions in the job. Each mode is wired in with one macro and one tracking column. There is a per-request escape hatch: setting process_avatar_upload to true before assigning an upload skips the job for that request. Subclassing the base worker gives you error and after_perform hooks without forking the gem, and the backend switch between ActiveJob and Sidekiq is a single configure call that also takes a queue name.

The first description in the README sits under process_in_background and says it stores the original with no processing, which is the reverse of what the name suggests, so the two modes are easy to mix up until you read the specs. store_in_background only works when every server mounts the same tmp directory, as the README's own warning says. On a multi-host deploy without shared disk it will fail in ways that are hard to trace. With Sidekiq, the README says jobs will not run unless the carrierwave queue is listed in the queue config, so a missed YAML line looks like uploads that never finish. Adoption also means changing the model, the uploader's cache_dir and cache_storage, and the schema together.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →