Answer the question
In order to leave comments, you need to log in
I can't set up capistrano, what am I doing wrong?
Configured gem capistrano following this instruction
Stops at moment
Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/"project name"/git-ssh.sh /usr/bin/env git ls-remote [email protected]:git )
Keys added, everything is tightened by hand.
Help!!!
Answer the question
In order to leave comments, you need to log in
The instruction looks like it contains a lot of unnecessary nonsense. I recommend reading with Capistrano Setup .
At a minimum, to install capistrano you need:
# Use Capistrano for deployment
group :development do
gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
gem 'capistrano-passenger'
gem 'capistrano-bower'
end
bundle exec cap install
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/bower'
require 'capistrano/passenger'
# config valid only for current version of Capistrano
lock '3.3.5'
set :application, 'my_awesome_site'
set :repo_url, '[email protected]:username/my_awesome_site.git'
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/user/www/#{fetch(:application)}"
# Default value for :scm is :git
set :scm, :git
role :app, %w{myhosting.ru}
role :web, %w{myhosting.ru}
role :db, %w{myhosting.ru}
# Extended Server Syntax
# ======================
# This can be used to drop a more detailed server definition into the
# server list. The second argument is a, or duck-types, Hash and is
# used to set extended properties on the server.
server 'myhosting.ru', user: 'user', roles: %w{web app db}
set :rails_env, 'production'
set :rvm_type, :user # Defaults to: :auto
set :rvm_ruby_version, '[email protected]' # Defaults to: 'default'
bundle exec cap production deploy:check
and do it for a long time bundle exec cap production deploy
catching deployment errors and fixing them :)Unfortunately, capistrano is not something that can be debugged remotely in psychic fashion.
I would advise only to break the task into steps and arm yourself with debugging.
maybe the deployer user needs sudo, maybe he doesn't have the keys, you can't just say that.
Capistrano doesn't have the best debug messages.
See which user is deploying. What are his rights. Which commands are executed and which are not. Look at all the logs you can find. Try to transfer the sources to bitbucket for the sake of testing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question