Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warning in Rails 7.1 #483

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

jamie
Copy link
Contributor

@jamie jamie commented Oct 29, 2023

I recently upgraded my Rails app to 7.1, and am getting a lot of the following in my logs:

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/jamie/code/realworld-rails-hotwire/vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:323)

Adding some extra debugging in active_record/connection_handling.rb pointed at lib/scout_apm/app_server_load.rb:54 being the actual callsite in question.

I'm not sure how backward compatible this change is (or how old of Rails is supported by Scout) but this change does clear the deprecation.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jrothrock
Copy link
Contributor

Thanks for the PR!

We support backdown to Rails 2.2 currently... which it looks like this is compatible with!

@jrothrock jrothrock merged commit 894314a into scoutapp:master Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants