Skip to content

Commit

Permalink
Allow sqlite3 v2 when using Rails 7.1 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascaton committed Dec 1, 2024
1 parent 3585b71 commit e6a876c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ rails_versions = JSON.parse(Net::HTTP.get(URI('https://rubygems.org/api/v1/versi
gem 'activesupport', "~> #{current_version}"
gem 'activerecord', "~> #{current_version}"

gem 'sqlite3', '< 2' # v2.x isn't yet working. See: https://github.com/sparklemotion/sqlite3-ruby/issues/529
if Gem::Version.new(rails_version) > Gem::Version.new(7.0)
gem 'sqlite3'
else
gem 'sqlite3', '< 2' # Rails 6.x and 7.0 require sqlite3 v1.x
end
end
end
2 changes: 1 addition & 1 deletion gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source 'https://rubygems.org'

gem 'activerecord', '~> 7.1.5'
gem 'activesupport', '~> 7.1.5'
gem 'sqlite3', '< 2'
gem 'sqlite3'

gemspec path: '../'
2 changes: 1 addition & 1 deletion gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source 'https://rubygems.org'

gem 'activerecord', '~> 7.2.2'
gem 'activesupport', '~> 7.2.2'
gem 'sqlite3', '< 2'
gem 'sqlite3'

gemspec path: '../'

0 comments on commit e6a876c

Please sign in to comment.