Skip to content

Commit

Permalink
Update dependency on sqlite3 gem to >= 2.1.0.rc3
Browse files Browse the repository at this point in the history
This version contains protections against sqlite's lack of fork
safety. We also suppress the warnings related to forking with open
writable connections, despite the lost memory per-connection.

For more context, see:
https://github.com/sparklemotion/sqlite3-ruby/blob/main/adr/2024-09-fork-safety.md
  • Loading branch information
flavorjones committed Sep 24, 2024
1 parent 5ff57a5 commit adcadda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ platforms :ruby, :windows do
gem "nokogiri", ">= 1.8.1", "!= 1.11.0"

# Active Record.
gem "sqlite3", ">= 2.0"
gem "sqlite3", ">= 2.1.0.rc3"

group :db do
gem "pg", "~> 1.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
require "active_record/connection_adapters/sqlite3/schema_dumper"
require "active_record/connection_adapters/sqlite3/schema_statements"

gem "sqlite3", ">= 2.0"
gem "sqlite3", ">= 2.1.0.rc3"
require "sqlite3"

# Suppress the warning that SQLite3 issues when open writable connections are carried across fork()
SQLite3::ForkSafety.suppress_warnings!

module ActiveRecord
module ConnectionAdapters # :nodoc:
# = Active Record SQLite3 Adapter
Expand Down

0 comments on commit adcadda

Please sign in to comment.