Rails Active Job: perform_later not executing in background

In my case I just forgot to run sidekiq with:

bundle exec sidekiq

Hope this helps someone else


To quote the docs:

Rails by default comes with an "immediate runner" queuing implementation. That means that each job that has been enqueued will run immediately.

What that means is that by default, active job will run in the main thread, not in "the background". This is a common gotcha. Basically active job is just a common API across multiple queueing backends.

TL;DR You have to set up a queueing backend like Sidekiq.

Otherwise, your setup looks great, textbook even.