Thanks Lee, I guess that makes sense - but is there documentation about this? Or do you just "know" it? :)
Thx!! On Tuesday, May 5, 2015 at 4:13:29 PM UTC-4, Lee Hambley wrote: > > 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 <joela...@gmail.com <javascript:>> > 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+...@googlegroups.com <javascript:>. >> 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/fc782b4b-6c45-4a3b-ad7e-82599b6eb886%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.