Contributees / First-Ruby-Quest

Web app referencing ruby related open source issues suitable for a first contribution and/or junior developers (or any developpers!)
MIT License
1 stars 2 forks source link

[WIP] Upgrade to Rails 7.2 & Ruby 3.2 and install Solid Queue instead of Sidekiq #47

Open ClaireDMT opened 3 weeks ago

ClaireDMT commented 3 weeks ago

What does this PR do?

This PR introduces the installation of SolidQueue to replace Sidekiq for background job processing. It also includes upgrades to Rails and Ruby to ensure compatibility and address deprecation warnings.

Introduction to Solid Queue

SolidQueue is a new backend for ActiveJob that processes jobs in the database instead of memory, offering better integration with Heroku and Puma. This simplifies deployment by eliminating the need for a separate Redis instance, making job processing and monitoring easier and more affordable.

Changes Made

1. Installed SolidQueue:

2. Upgraded Rails:

3. Upgraded Ruby:

How to Update Local Master or Branch for Testing

Install New Dependencies:

  1. Ensure you have the latest Ruby version installed

rbenv install 3.2.0 rbenv local 3.2.0

  1. Install the updated gems

bundle install

  1. Run Migrations

rails db:migrate

  1. Start the Application. Solid Queue is started with puma, so no need to add it to the Procfile dev

We provide a Puma plugin if you want to run the Solid Queue's supervisor together with Puma and have Puma monitor and manage it. You just need to add plugin :solid_queue to your puma.rb configuration.

_https://github.com/rails/solid_queue?tab=readme-ov-file#puma-plugin_