diff --git a/activerecord/lib/active_record/middleware/database_selector/resolver.rb b/activerecord/lib/active_record/middleware/database_selector/resolver.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/middleware/database_selector/resolver.rb
+++ b/activerecord/lib/active_record/middleware/database_selector/resolver.rb
@@ -1,6 +1,7 @@
 # frozen_string_literal: true
 
 require "active_record/middleware/database_selector/resolver/session"
+require "active_support/core_ext/numeric/time"
 
 module ActiveRecord
   module Middleware
Make AR::Middleware::DatabaseSelector loadable without full core ext