Skip to content

Commit

Permalink
Fix local sqlite3 build
Browse files Browse the repository at this point in the history
Main change was to sqlite3. The 2.0 driver broke things

Locally, was having trouble compiling mysql2,
so hardc oded a version that is working
  • Loading branch information
kbrock committed Jun 12, 2024
1 parent d2e2f2a commit 8cb59e6
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
# - https://guides.rubyonrails.org/maintenance_policy.html
format: [materialized_path, materialized_path2]
activerecord: [70, 71]
ruby: [3.1, 3.2]
ruby: [3.2, 3.3]
# additional tests
include:
# EOL 6/2022
- ruby: 2.5
# EOL 6/2022 (ruby >= 2.2.2, <2.7)
- ruby: 2.6
activerecord: 52
# EOL 2023
- ruby: 2.7
Expand Down
14 changes: 13 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
%w[5.2.8 6.0.6 6.1.7 7.0.8 7.1.2].each do |ar_version|
# on a mac using:
# bundle config --global build.mysql2 "--with-mysql-dir=$(brew --prefix mysql)"

%w[5.2.8 6.0.6 6.1.7 7.0.8 7.1.3].each do |ar_version|
appraise "gemfile-#{ar_version.split('.').first(2).join}" do
gem 'activerecord', "~> #{ar_version}"
# active record 5.2 uses ruby 2.6
# active record 6.x uses ruby 2.7 (sometimes 3.0)
# so we are targeting the ruby version indirectly through active record
if ar_version < "7.0"
gem "sqlite3", "~> 1.6.9"
else
# sqlite3 v 2.0 is causing trouble with rails
gem "sqlite3", "< 2.0"
end
end
end
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ gemspec
gem "activerecord", "~> 6.1.7"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "~> 1.6.9"
2 changes: 1 addition & 1 deletion gemfiles/gemfile_52.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source "https://rubygems.org"
gem "activerecord", "~> 5.2.8"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "~> 1.6.9"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/gemfile_60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source "https://rubygems.org"
gem "activerecord", "~> 6.0.6"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "~> 1.6.9"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/gemfile_61.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source "https://rubygems.org"
gem "activerecord", "~> 6.1.7"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "~> 1.6.9"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/gemfile_70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source "https://rubygems.org"
gem "activerecord", "~> 7.0.8"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "< 2.0"

gemspec path: "../"
4 changes: 2 additions & 2 deletions gemfiles/gemfile_71.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

source "https://rubygems.org"

gem "activerecord", "~> 7.1.2"
gem "activerecord", "~> 7.1.3"
gem "mysql2"
gem "pg"
gem "sqlite3"
gem "sqlite3", "< 2.0"

gemspec path: "../"

0 comments on commit 8cb59e6

Please sign in to comment.