diff --git a/sentry-delayed_job/Gemfile b/sentry-delayed_job/Gemfile index 6e95b7135..817f14f47 100644 --- a/sentry-delayed_job/Gemfile +++ b/sentry-delayed_job/Gemfile @@ -22,10 +22,14 @@ platform :jruby do gem "jdbc-sqlite3" end -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0") - gem "sqlite3", "~> 1.3.0", platform: :ruby -else - gem "sqlite3", "~> 2.1", platform: :ruby +ruby_version = Gem::Version.new(RUBY_VERSION) + +if ruby_version < Gem::Version.new("2.5.0") + gem "sqlite3", "~> 1.6.0", platform: :ruby +elsif ruby_version >= Gem::Version.new("3.0.0") && ruby_version < Gem::Version.new("3.1.0") + gem "sqlite3", "~> 1.7.0", platform: :ruby +elsif ruby_version >= Gem::Version.new("3.1.0") + gem "sqlite3", "~> 2.2", platform: :ruby end eval_gemfile File.expand_path("../Gemfile", __dir__)