From 38e0d9187a12cde4ec3f433070f0a22a3705e0ad Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 20 Apr 2024 00:13:03 +0900 Subject: [PATCH] [CI] Rails 8 doesn't support sqlite3 2.x and sqlite3 2.x doesn't support Ruby 2.x --- Gemfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index b64b6e2..4492b35 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,13 @@ end rails_version = ENV['RAILS_VERSION'] || '∞' platforms :ruby do - gem 'sqlite3', rails_version >= '5.1' ? '>= 1.4' : '< 1.4' + if rails_version <= '5.0' + gem 'sqlite3', '< 1.4' + elsif (ENV['RAILS_VERSION'] <= '8') || (RUBY_VERSION < '3') + gem 'sqlite3', '< 2' + else + gem 'sqlite3' + end end platforms :jruby do gem 'activerecord-jdbcsqlite3-adapter'