Skip to content

Commit

Permalink
Gemfile compatible versions of ruby, activerecord, sqlite
Browse files Browse the repository at this point in the history
need a flipping database
  • Loading branch information
notEthan committed Nov 24, 2024
1 parent 140f16f commit 4fdbbb1
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ gem 'rack-accept'
gem 'rack-test'
gem 'webrick'
gem 'api_hammer'
gem('activerecord')
platform(:mri, :truffleruby) do
gem 'sqlite3', '>= 2.1' # loosen this in accordance with active_record/connection_adapters/sqlite3_adapter.rb
ruby_version = RUBY_VERSION.split('.').map(&:to_i)
[
{activerecord: '~> 8.0', ruby: [3, 2, 0], sqlite: '>= 2.1'},
{activerecord: '~> 7.2', ruby: [3, 1, 0], sqlite: '>= 1.4'},
{activerecord: '~> 7.0', ruby: [2, 7, 0], sqlite: '>= 1.4'},
{activerecord: '~> 6.0', ruby: [2, 5, 0], sqlite: '~> 1.4'},
].map(&:values).each do |activerecord, ruby, sqlite|
if (ruby_version <=> ruby) >= 0
gem('activerecord', activerecord)

platform(:mri, :truffleruby) do
gem('sqlite3', sqlite) # loosen this in accordance with active_record/connection_adapters/sqlite3_adapter.rb
end
break
end
end

platform(:jruby) do
gem 'activerecord-jdbcsqlite3-adapter'
end
Expand Down

0 comments on commit 4fdbbb1

Please sign in to comment.