Install and set up GoodJob
mainTo integrate GoodJob into your Rails application, follow these steps:
- Add the gem to your
Gemfileand install:bundle add good_job - Run the installation generator to create the necessary database migrations:
Note: If using Rails multiple databases withbin/rails g good_job:installmigrations_paths, use the--databaseflag, e.g.,bin/rails g good_job:install --database animals. - Run the migrations:
bin/rails db:migrate - Configure Active Job to use the GoodJob adapter in
config/application.rbor your environment-specific config files:config.active_job.queue_adapter = :good_job
bundle add good_job
bin/rails g good_job:install
bin/rails db:migrate