I am deploying my application on localhost using capistrano , but getting the below error:
INFO [5f197b14] Running /usr/bin/env mkdir -p /tmp/promo_app/ as chakreshwar@localhost DEBUG [5f197b14] Command: /usr/bin/env mkdir -p /tmp/promo_app/ (Backtrace restricted to imported tasks) cap aborted! Errno::ECONNREFUSED: Connection refused - connect(2) for 127.0.0.1:22
I am using the below gem for capistrano
gem 'capistrano'
gem 'capistrano-ext'
Below is the code of Deploy.rb
# config valid only for current version of Capistrano
lock '3.4.0'
set :application, 'my_app'
set :repo_url, '/home/test/git_server/test_app.git'
set :deploy_to, '/home/test/projects/capistrano_deployment/my_app'
set :scm, :git
set :format, :pretty
# Default value for :pty is false
set :pty, true
set :default_stage, "staging"
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
end
end
end
Below is my staging.rb:
server 'localhost', user: 'username', roles: %w{app db web}#
:other_value
role :app, %w{localhost}#, my_property: :my_value
role :web, %w{localhost}#, other_property: :other_value
role :db, %w{localhost}
Please tell if anything missed in it .