Инструкция выглядит содержащей много лишней ерунды. Рекомендую читать с
Capistrano Setup.
По минимум для установки capistrano нужно:
- Понять какие инструменты нужны для деплоя: rvm, bower, etc ...
- Добавить всё что нужно в Gemfile
# 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
- Затребовать все эти модули в Capfile
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/bower'
require 'capistrano/passenger'
- Заполнить минималистский config/deploy.rb
# config valid only for current version of Capistrano
lock '3.3.5'
set :application, 'my_awesome_site'
set :repo_url, 'git@bitbucket.org: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
- Задать специфичные параметры среды развёртки в config/deploy/production.rb
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, '2.1.4@r4' # Defaults to: 'default'
- Всё. Потом сделать
bundle exec cap production deploy:check
и долго долго делать bundle exec cap production deploy
отлавливая ошибки деплоя и исправляя их :)