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

Deprecation warning in rails 7.1 #217

Closed
bjer opened this issue Oct 12, 2023 · 1 comment
Closed

Deprecation warning in rails 7.1 #217

bjer opened this issue Oct 12, 2023 · 1 comment

Comments

@bjer
Copy link
Contributor

bjer commented Oct 12, 2023

Got a deprecation warning when updating an app to Rails 7.1:

 DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_all_connections! is deprecated. 
Please call the method directly on the connection handler; for example: 
`ActiveRecord::Base.connection_handler.clear_all_connections!`. 
(called from before_fork at .rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/bundler/gems/delayed_job_active_record-6e8709f887fa/lib/delayed/backend/active_record.rb:65)
 (ActiveSupport::DeprecationException)

Fixed by changing call clear_all_connections! in active_record.rb:65

@ghiculescu
Copy link

FYI to anyone else - this was fixed in #218

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

No branches or pull requests

3 participants