Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ gem 'pundit', '~> 2.5.2'
gem 'rack-attack', '~> 6.8.0'
gem 'rails', '~> 7.2.3'
gem 'rails-i18n', '~> 7.0.10'
gem 'redis', '~> 5.0'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify redis is needed as an explicit dependency.

Redis is added with ~> 5.0 at line 32, resolving to version 5.4.1. Since Sidekiq (line 37, ~> 8.0.9) already includes redis as a transitive dependency, adding it explicitly may be redundant unless:

  1. The project requires redis independently (beyond Sidekiq).
  2. This pins a specific version to address a compatibility issue.
  3. Sidekiq's version constraint no longer includes redis.

Clarify why redis must be an explicit dependency and whether the version constraint aligns with your stability/security requirements.

Run the following script to check Sidekiq's dependency on redis and the current Gemfile.lock state:


🏁 Script executed:

#!/bin/bash
# Check whether Sidekiq 8.0.9 depends on redis and what version it expects
gem dependency sidekiq --version "8.0.9" 2>/dev/null | grep redis || echo "Sidekiq 8.0.9 dependency tree not available locally"

# Check if Gemfile.lock already resolves redis transitively from Sidekiq
echo "--- Checking Gemfile.lock for redis ---"
grep -A 5 "redis" Gemfile.lock | head -20

Length of output: 671


Fix critical Redis version mismatch with Sidekiq 8.0.9.

The redis gem is correctly added as an explicit dependency (needed by redis-store, redis-rails, etc.). However, Redis 7.0 is the minimum required version for Sidekiq 8.x. The constraint ~> 5.0 resolves to 5.4.1, which will cause runtime failures when Sidekiq tries to connect.

Change line 32 to: gem 'redis', '~> 7.0'

🤖 Prompt for AI Agents
In Gemfile around line 32, the redis gem constraint '~> 5.0' is incompatible
with Sidekiq 8.x (requires Redis >= 7.0); update the line to use the newer
constraint by changing the version specifier to '~> 7.0' and then run bundle
install (or bundle update redis) to update the lockfile so Sidekiq will use a
compatible Redis client version.

gem 'rest-client', '~> 2.1.0'
gem 'sentry-rails', '~> 6.1', '>= 6.1.1'
gem 'sentry-ruby', '~> 6.1', '>= 6.1.1'
Expand Down
19 changes: 19 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,26 @@ GEM
erb
psych (>= 4.0.0)
tsort
redis (5.4.1)
redis-client (>= 0.22.0)
redis-actionpack (5.5.0)
actionpack (>= 5)
redis-rack (>= 2.1.0, < 4)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.3.0)
activesupport (>= 3, < 8)
redis-store (>= 1.3, < 2)
redis-client (0.26.1)
connection_pool
redis-rack (3.0.0)
rack-session (>= 0.2.0)
redis-store (>= 1.2, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.11.0)
redis (>= 4, < 6)
regexp_parser (2.11.3)
reline (0.6.3)
io-console (~> 0.5)
Expand Down Expand Up @@ -638,6 +656,7 @@ DEPENDENCIES
rails-controller-testing (~> 1.0.5)
rails-i18n (~> 7.0.10)
rb-readline (~> 0.5.5)
redis-rails (~> 5.0)
rest-client (~> 2.1.0)
rspec-rails (~> 8.0.2)
rubocop (~> 1.81.7)
Expand Down
2 changes: 1 addition & 1 deletion app/views/payments/add.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Saldo opwaarderen voor <%= @user.name %>
</h1>

<%= simple_form_for(@payment, wrapper: :horizontal_form) do |f| %>
<%= simple_form_for(@payment, wrapper: :horizontal_form, data: { turbo: false }) do |f| %>
<div class="col-12">
<p>
Voer hier het bedrag in dat je wilt inleggen. Hierna zal je worden doorgestuurd naar de betaalomgeving.
Expand Down