刚刚更新了我的宝石,当我尝试运行任何cap
命令时,我没有收到以下错误。
no servers found to match {:once=>true, :eof=>true}
我的宝石版本是:
capistrano (2.15.5)
capistrano-platform-resources (0.1.3)
capistrano-rbenv (1.0.5)
我的config / deploy.rb看起来像:
# the name of the application
set :application, "appname"
# RVM
require "capistrano-rbenv"
set :rbenv_ruby_version, "1.9.3-p194"
# Bundler
require "bundler/capistrano"
# General
# this should be the username on the server
set :user, "deploy"
# the path to install the application in on the server
set :deploy_to, "/home/#{user}/path/to/#{application}"
# Setting this to 'remote_cache' will ensure that only
# changes are sent to the server, not the whole repository
# NOTE: Can only use remote_cache in conjunction with github repos
set :deploy_via, :remote_cache
set :use_sudo, false
# Git
# Github say I need this, thus I need it
# INFO: http://help.github.com/deploy-with-capistrano/
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :scm, :git
set :repository, "git@github.com:dtuite/#{application}.git"
# the local location of the app.
# which branch to checkout during deploy
set :branch, "master"
# the IP address of the VPS
server "[the server ip]", :web, :app, :db, primary: true
如何解决此问题?
答案 0 :(得分:0)
尝试删除
# the IP address of the VPS
server "[the server ip]", :web, :app, :db, primary: true
单独声明域名,如此 -
# App Domain
set :domain, "yourdomain.com or IP address"
然后这将替换您删除的行 -
# All components of the app on the same server
server domain, :app, :web, :db, :primary => true