Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To auto-invoke on rake:db:migrate in Rails 3 using as gem #23

Closed
DougPuchalski opened this issue May 16, 2011 · 3 comments
Closed

To auto-invoke on rake:db:migrate in Rails 3 using as gem #23

DougPuchalski opened this issue May 16, 2011 · 3 comments
Labels

Comments

@DougPuchalski
Copy link

Add to the end of your Rakefile.

Dir["#{Gem.searcher.find('annotate').full_gem_path}/**/tasks/**/*.rake"].each {|ext| load ext}
@ctran
Copy link
Owner

ctran commented Jun 27, 2011

Added this to the wiki.

@ctran ctran closed this as completed Jun 27, 2011
@igorbernstein
Copy link

To avoid deprecation warnings use:

Dir["#{Gem::Specification.find_by_name("annotate").full_gem_path}/**/tasks/**/*.rake"].each {|ext| load ext}

@eLafo
Copy link

eLafo commented Nov 26, 2012

I think this should be done only in development mode. So maybe it is better to use:

Dir["#{Gem::Specification.find_by_name("annotate").full_gem_path}/**/tasks/**/*.rake"].each {|ext| load ext} if Rails.env.development?

@ctran ctran added the reviewed label Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants