我正在使用 Active Record 开发 Ruby Sinatra 应用程序,每次 HTTP 调用时它都会在控制台中打印此错误消息。
我找不到有关此弃用或如何修复它的更多信息。
DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example: `ActiveRecord::Base.connection_handler.clear_active_connections!`. (called from clear_active_connections! at /Users/user/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:320)
解决了。只需要更新 gem