I\'m writing a rake task that does some DB work outside of Rails/ActiveRecord.
Is there a way to get the DB connection info (host, username, password, DB name) for t
I think this is the simplest solution. After some testing (in Rails 5.2 at least) this will resolve DATABASE_URL correctly.
ActiveRecord::Base.configurations[Rails.env]