Wes, naturally - Cap's DSL was originally styled after rake, it's an easy mistake to make. Depending how you want to do it, you can simply `require` your `Rakefile` in the Cap script, (ensuring of course to include Rake, if that directive is absent from your rakefile), and then you call tasks with something like (and I'm working from memory here)
Rake::Tasks['mytask'].invoke (there's also `.execute`, but check the docs for why to use one/the other) - and, check the Rake docs, anyway! I hope that helps, if not - the easiest alternative, just shell-out and call it that way. On 3 June 2011 07:24, Wes Gamble <[email protected]> wrote: > How does one call a rake task from within a deploy task? > > I foolishly assumed that cap automatically had access to rake tasks but > that doesn't appear to be the case. > > Thanks, > Wes > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
