kenn / standby

Read from standby databases for ActiveRecord
MIT License
87 stars 28 forks source link

ActiveRecord::Base.configurations error after rails 7 upgrade #39

Open xspaniki opened 1 year ago

xspaniki commented 1 year ago

Hello,

after I upgraded rails 7 this gem has problem with access to ActiveRecord::Base.configurations as to Hash object.

https://www.fastruby.io/blog/rails/upgrades/upgrade-rails-6-1-to-7-0.html

Problem is in lib/standby/connection_holder.rb in activate function. In PR is one pending to fix this (https://github.com/kenn/standby/pull/38). Please can you update gem to work with rails 7? For now i forked repository but i would like to use gem directly.

Thanks !

kenn commented 1 year ago

Pull request welcomed!

xspaniki commented 1 year ago

@kenn here bro https://github.com/kenn/standby/pull/40

xspaniki commented 1 year ago

ok it looks like i didnt check compatibility with older versions, so i have to check that

kenn commented 1 year ago

Oops, I just merged so I'll be waiting for another PR, thanks a bunch @xspaniki !

xspaniki commented 1 year ago

@kenn Im not sure why ruby 2.2 checks didnt pass but it looks like there some issue independent on my MR https://github.com/kenn/standby/actions/runs/4552218725

MR: https://github.com/kenn/standby/pull/41