We have a rake task called db:sanity_check which exists in a 'core' repo.

Other repositories that we have also show this rake task.
But they do not define the rake task. It 'comes' from core'

How do these other repositories know about the rake tasks from the 'core' repository ?
Is it because they include that repository in their Gemfile ?

I have a new repository that I want to have the db:sanity_check available for but I don't know how to have the reference to the task which exists in the other repo.

This is NOT about creating the task itself!

1 Answer 1


If it is a rails project and you set your 'core' repository as a gem in the Gemfile, then rake has access to the 'core' rake tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.