RailsCasts Pro episodes are now free!

Learn more or hide this

Breno Santos Salgado's Profile

GitHub User: salgadobreno

Comments by Breno Santos Salgado


here's the code I used on the task to get it to work!(found it around github..)

task :install, roles: :web do
    run "#{sudo} add-apt-repository ppa:nginx/stable",:pty => true do |ch, stream, data|
      if data =~ /Press.\[ENTER\].to.continue/
        #prompt, and then send the response to the remote process
        ch.send_data(Capistrano::CLI.password_prompt("Press enter to continue:") + "\n")
        #use the default handler for all other text

    run "#{sudo} apt-get -y update"
    run "#{sudo} apt-get -y install nginx"

can't get it to work...

I'm not using a clean clone of this, but when installing nginx it will simply stop waiting the user to press [ENTER] and... well, nothing more..

** [out :: ec2-23-22-22-218.compute-1.amazonaws.com] Stable
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com]
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com] Stable version of nginx.
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com]
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com] More info: https://launchpad.net/~nginx/+archive/stable
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com]
** [out :: ec2-23-22-22-218.compute-1.amazonaws.com] Press [ENTER] to continue or ctrl-c to cancel adding it

I tried getting dropbox through capistrano there too but it doesnt seem to be possible too because I'd need to stop dropboxd daemon after linking the accounts, doesnt seem to be possible...

the screencast was great... I`m not very confident in the approach of using it to set up the VPS tho... it seems anything that will provide a prompt that's not to input text will just stop the scripts forever

or I could be doing something wrong, were you guys able to get the cap deploy:install to work?


Do I really need an external git repository for this?

I'm not being able to find decent resources on a setup with only my machine and my vps...