I'm building a Rails application based on hexagonal architecture.
One of my adapters is storage adapter (maintained as a gem) that manages access to database and provides simple interface for rails application to store and query data in database.
I'd like to use ActiveRecord in this gem with all rake tasks (create, migrate, drop, rollback) for managing database.
How can I use AR outside rails, but with all rake tasks?