After running mina init
and modifying my deploy.rb to point to my web server, I try to run mina setup
and it hangs after I enter my SSH password. I hit enter, nothing happens, and when I break, it errors out with a broken pipe error. I know I can SSH in using the same account and password. Any thoughts?
The setup part of my deploy.rb is as follows:
set :domain, 'adammargherio.com'
set :deploy_to, '/srv/www/adammargherio.com'
set :repository, 'git://github.com/amargherio/personal.git'
set :branch, 'master'
set :user, 'deploy'
set :port, '22'
task :setup => :environment do
queue! %[mkdir -p "#{deploy_to}/shared/log"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"]
queue! %[mkdir -p "#{deploy_to}/shared/config"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"]
queue! %[touch "#{deploy_to}/shared/config/database.yml"]
queue %[-----> Be sure to edit 'shared/config/database.yml'.]
end
And the results from executing the setup
command are:
[email protected]'s password:
-----> Mina: SIGINT received.
Elapsed time: 68.00 seconds
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:111:in `write': Broken pipe (Errno::EPIPE)
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:111:in `putc'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:111:in `block (2 levels) in pretty_system'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:108:in `fork'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:108:in `block in pretty_system'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/open4-1.3.0/lib/open4.rb:107:in `call'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/open4-1.3.0/lib/open4.rb:107:in `do_popen'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/open4-1.3.0/lib/open4.rb:30:in `popen4'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/tools.rb:11:in `popen4'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/output_helpers.rb:83:in `pretty_system'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/ssh_helpers.rb:43:in `ssh'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/helpers.rb:49:in `block in run!'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/helpers.rb:76:in `measure'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/helpers.rb:65:in `report_time'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/helpers.rb:49:in `run!'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/lib/mina/helpers.rb:86:in `mina_cleanup!'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/bin/mina:55:in `block (2 levels) in <top (required)>'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/bin/mina:26:in `block in <top (required)>'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/bin/mina:25:in `instance_eval'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.1/bin/mina:25:in `<top (required)>'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/bin/mina:19:in `load'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/bin/mina:19:in `<main>'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
from /home/adam/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'
Rolled back to version 0.2.0 and the setup
command works fine. Seems to be an issue with 0.2.1.
I'm actually having this issue without SIGINT. Every time mina is done there is:
output_helpers.rb:111:in `write': Broken pipe
Otherwise - awesome gem, thanks a lot for your work!
Did you try to use master?
@killthekitten Yes, master
works fine. Thank you!
Is it just me or did Mina lose colors? :( It was much more colorful in 0.2.1
@slava-vishnyakov that's a good question, and I didn't find the answer)
I had the same questions,and even I type the -t
to show the log,It change nothing.
I hope in this time,It could tell me some wrong
@slava-vishnyakov, colors are fixed in 0.3.0
. @rstacruz made sure of that. :)
This issue should also be no longer happening in the latest version.
I have this issue now. tried with latest mina on master!
and mina 0.3.0
Have the same error/freeze on v0.3.0
Any ideas?
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
set :domain, 'repo.com'
set :deploy_to, '/var/www/repo.com'
set :repository, '[email protected]:ekurennyy/repo.git'
set :branch, 'master'
set :shared_paths, ['config/database.yml', 'log']
task :environment do
invoke :'rbenv:load'
end
task :setup => :environment do
queue! %[mkdir -p "#{deploy_to}/shared/log"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"]
queue! %[mkdir -p "#{deploy_to}/shared/config"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"]
queue! %[touch "#{deploy_to}/shared/config/database.yml"]
queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."]
end
desc "Deploys the current version to the server."
task :deploy => :environment do
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
to :launch do
queue "touch #{deploy_to}/tmp/restart.txt"
end
end
end
Add below line to deploy.rb to fix ssh Hang issue
set :term_mode, nil
Most helpful comment
Add below line to deploy.rb to fix ssh Hang issue
set :term_mode, nil