注意喚起の記事になります。タイトルが結論です。 既にこの問題に言及している記事はいくつかあるのですが*1、私は気付かずに踏んでしまったので、タイトルで「おっと、うちは大丈夫かな」と思ってもらえるようにこの記事を書いています。 joinableとは何か 問題として挙げているjoinableオプションですが、これはネストしたトランザクションの挙動に影響を与えます。少しややこしいので、サンプルコードを見せながら説明します。 # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "activerecord", "7.