I had activerecord-multi-tenant referenced in my Gemfile but did not actually use it.
It broke when I updated my application to Rails 7.2.
Removing the gem fixed my application. So there must be some problem with the gem with this latest Rails version.