Is there a better way to run a capistrano task from within rake?
问题 I have a set of rake tasks where I need to invoke capistrano at some point. Edwin Goei's blog suggests shelling out to capistrano via "sh". Is there a simpler way? It would seem you should be able to call the appropriate tasks programmatically. Thanks in advance. 回答1: Yes, Capistrano has programmatic access to the command-line components. If you want to call them from a rake task, though, you need to do a little extra work. task :deploy require 'rubygems' require 'capistrano' require