Quoting Steven Hansen <runner / berkeley.edu>:

>
>
> Greetings,
>
> I'm wondering if anyone has used Capistrano to automate the installation
> of gems on remote machines.
>
> The problem I'm having is that when you install a gem from the command
> line, at various stages it will prompt you for a 'Y' or 'N' answer.
>
> Let's say I have the following task and I want it to run on a remote
> machine:
>
> desc "Install rails"
> task :install_rails do
>   run "gem install rails"
> end
>
> The task starts up and begins the installation, but then hangs after I
> get the 'Y' or 'N' prompt.
>
> Is there a way to just skip the prompt and specify 'Y' for everything?

Could you use the Unix 'yes' command?

man yes