I'm modifying a Ruby Gem to allow it to modify a Rails database via a rake task.
I was able to connect the database and modify its content by passing the database configuration as parameters to the rake task, which then called the ActiveRecord::Base.establish_connection. My question is, how could the Gem connect to the Rails database without having to specify the database configuration as parameters in the rake task.