You're missing the "on()" block, you need to wrap the task inside something like:
task :downloaddb do on roles(:db) do # <<<----------- you missed this bit! # everything from your task here end end Lee Hambley http://lee.hambley.name/ +49 (0) 170 298 5667 On 5 May 2015 at 21:26, Joel Taylor <joelatay...@gmail.com> wrote: > Versions: > > - Ruby 2.0.0p576 > - Capistrano 3.4.0 > > I'm learning Ruby + Capistrano. I'm trying to write a task that will pull > down a file of a remote server. A simple start so I thought. :) > > Here's the task: http://pastie.org/10160640 > I have it under: /lib/capistrano/tasks/sync_db.rb > > I can see the task available when I run: cap -T > > cap sync_db:to_local # Download and import DB to local > > However, I'm getting this output/error: > > Downloading Staging DB > > (Backtrace restricted to imported tasks) > > cap aborted! > > NoMethodError: undefined method `execute' for main:Object > > /.../lib/capistrano/tasks/sync_db.rb:10:in `block (2 levels) in <top ( > required)>' > > Tasks: TOP => sync_db:to_local > > (See full trace by running task with --trace) > > > the 'download!' command isn't working either ... what am I missing??? > > -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to capistrano+unsubscr...@googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/e4d093c2-4160-4b16-ab5d-89bc0b0b9de1%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/e4d093c2-4160-4b16-ab5d-89bc0b0b9de1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLVRAbkz_HHe-TFuv2QmQ_1gMZ_yRN4PWka2HeCre_rUNg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.