I recently started using capistrano in my rails application deployment. It was working fine for me and then all of a sudden, I started getting this error
sorry, you must have a tty to run sudo
after every gem it tried to install. I know this problem can typically be solved by putting in set :use_sudo, false
in the deploy.rb file but I already have that in there. And the strangest thing is that I reverted my ENTIRE directory back to when I know for sure capistrano was working and it's still giving me the same error.
My server is running CentOS
So what could the problem possibly be caused by? Any ideas?
You can tell cap to create a pty for each process, by adding this line:
default_run_options[:pty] = true
to Capfile
For Capistrano 3 you need to add:
set :pty, true
to the file config/deploy.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With