I am using Capistrano 3 and I want to create my own task. Therefore, I created the file my_new_thing.rake in lib / capistrano / tasks, and I see the task when I start cap -T. But ... some of the methods are not available. When I try to use the download! I get
cap aborted!
NoMethodError: undefined method `upload!' for main:Object
But if I transfer the same task to config / deploy.rb, then download! method is available.
So what is going on? How to create new Capistrano tasks, put them in a separate file and make them work?
source
share