My Rails 3 application uses Datamapper (dm-rails) as its main ORM, but it also needs to load ActiveRecord as it is required by a custom gem I'm using.
My problem is that the application now has two db:migrate
rake tasks, and if I run rake db:migrate
I get the following error:
rake aborted!
VERSION is required
Tasks: TOP => db:migrate => db:migrate:up
(See full trace by running task with --trace)
How do I make sure the ActiveRecord rake tasks are hidden so that I can execute the Datamapper migrate task? Using automigrate is not an option. Also, I want to use the actual db:migrate
rake task, not another rake task, and not some console workaround.
Edit: My current workaround is to simply copy the Datamapper rake tasks under the db namespace and redefine them in a custom tasks file under a different namespace. This works. It seems redundant though and I would prefer a cleaner solution.