From d6109e933f071bc707aaada7ea3dddd38902c604 Mon Sep 17 00:00:00 2001 From: Dalibor Nasevic Date: Fri, 27 Oct 2023 09:44:40 +0200 Subject: [PATCH] Rails 7.1 needs this the explicit require --- lib/octoshark/connection_pools_manager.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/octoshark/connection_pools_manager.rb b/lib/octoshark/connection_pools_manager.rb index d4be4bd..982a5a5 100644 --- a/lib/octoshark/connection_pools_manager.rb +++ b/lib/octoshark/connection_pools_manager.rb @@ -81,6 +81,7 @@ def create_connection_pool(name, config) def build_connection_pool_spec(name, config) if active_record_6_1_or_7? env_name = defined?(Rails) ? Rails.env : nil + require "active_record/database_configurations" db_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(env_name, name, config) pool_config_class = ActiveRecord::ConnectionAdapters::PoolConfig