[Rubygems-developers] Adding Tasks to Rake from a Gem?

Nic Williams drnicwilliams at gmail.com
Tue Dec 19 18:35:53 EST 2006


Sorry, it will load the *.rake files, not "Rakefiles" from the gem.

On 12/20/06, Nic Williams <drnicwilliams at gmail.com> wrote:
>
> Two options:
>
> i) In your Rakefile, you need to load the target rake files.
> ii) In a Rails app, you could use gemsonrails project to link/freeze the
> gem into your app, and it will automatically find your Rakefiles. (
> https://rubyforge.org/projects/gemsonrails/)
>
> Nic
>
> On 12/20/06, Anthony Eden < anthonyeden at gmail.com> wrote:
> >
> > Is it possible to add tasks to Rake at runtime from a Gem? Right now I
> > can include the following in Ruby code to get make the library
> > available:
> >
> > require_gem 'activewarehouse'
> > require 'active_warehouse'
> >
> > However this will not expose my custom tasks to Rake (they are
> > currently defined in tasks/*.rake). Any thoughts on how I can cleanly
> > get my Rake tasks added on the fly? I am currently using Rake 0.7.1.
> > Thanks for any help on this.
> >
> > V/r
> > Anthony
> >
> > --
> > Cell: 808 782-5046
> > Current Location: Melbourne, FL
> > _______________________________________________
> > Rubygems-developers mailing list
> > Rubygems-developers at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rubygems-developers
> >
>
>
>
> --
> Dr Nic Williams
> http://www.drnicwilliams.com - Ruby/Rails blog
> skype: nicwilliams
> (m) +31 62 494 8552
> (p) +61 7 3102 3237 (finds me anywhere in the world)
> (f) +61 7 3305 7572 (sends fax to my email)




-- 
Dr Nic Williams
http://www.drnicwilliams.com - Ruby/Rails blog
skype: nicwilliams
(m) +31 62 494 8552
(p) +61 7 3102 3237 (finds me anywhere in the world)
(f) +61 7 3305 7572 (sends fax to my email)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061220/d9839828/attachment.html 


More information about the Rubygems-developers mailing list