Skip to content

Commit efd7e7a

Browse files
authored
[rails] Use trilogy for the MySQL adapter (#8471)
Trilogy is a new client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding. It is used by Github and Shopify in production and will probably replace the `mysql2` library. https://github.com/trilogy-libraries/trilogy
1 parent 2bd4120 commit efd7e7a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

frameworks/Ruby/rails/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ruby '~> 3.2'
22

33
source 'https://rubygems.org'
44

5-
gem 'mysql2', '0.5.5', group: :mysql
5+
gem 'trilogy', group: :mysql
66
gem 'oj', '~> 3.16'
77
gem 'pg', '1.5.4', group: :postgresql
88
gem 'puma', '~> 6.4'

frameworks/Ruby/rails/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ os = "Linux"
3535
orm = "Full"
3636
platform = "Rack"
3737
webserver = "Puma"
38-
versus = "rack-puma-mri"
38+
versus = "rack-puma-mri"

frameworks/Ruby/rails/config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test:
1515

1616
production_mysql:
1717
<<: *default
18-
adapter: mysql2
18+
adapter: trilogy
1919

2020
production_postgresql:
2121
<<: *default

frameworks/Ruby/rails/rails.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /rails
88
COPY ./Gemfile* /rails/
99

1010
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
11-
ENV BUNDLE_WITHOUT=mysql
11+
ENV BUNDLE_WITHOUT=trilogy
1212
RUN bundle install --jobs=8
1313

1414
COPY . /rails/

0 commit comments

Comments
 (0)