I want to install a gem on all my application servers, but gem install requires sudo access – how can I enable sudo only for running this capistrano command?
In other words, I don’t wish to use sudo for all my deployment recipes, just when I invoke this command on the command line.
Found it – cap invoke COMMAND=’command that requires sudo‘ SUDO=1