Capistrano ::部署时的NoMatchingServersError:update_code

 儒妹妹_761 发布于 2023-02-13 10:28

我有一个capistrano部署脚本,可以在我的Windows本地计算机上运行,​​但是mac上的同事正在遇到部署错误.它实际上只是他的笔记本电脑,因为它也适用于其他的Mac,所以我想知道是否有一些需要清除的capistrano缓存?错误是......

* Compressing /var/folders/kv/g4k3rk815sd14948vzf1lhg40000gn/T/20131203013325 to /var/folders/kv/g4k3rk815sd14948vzf1lhg40000gn/T/20131203013325.tar.gz
    executing locally: tar czf 20131203013325.tar.gz 20131203013325
    command finished in 114ms
*** [deploy:update_code] rolling back
 ** [deploy:update_code] exception while rolling back: Capistrano::NoMatchingServersError, `deploy:update_code' is only run for servers matching {:except=>{:no_release=>true}}, but no servers matched `deploy:update_code' is only run for servers matching {:except=>{:no_release=>true}}, but no servers matched

我的deploy.rb(重要部分)如下......

set :application, "app"

task :prod do 
  role :app, "10.1.40.123"
  role :web, "10.1.40.123"
  role :db,  "10.1.40.123", :primary => true
  set :user, "root"
  set :password, "password"
  set :rails_env, "production"
  set :use_sudo, false
  load 'deploy/assets' # this line runs rake assets precompile
  set :os, 'ubuntu'
  default_environment["LD_LIBRARY_PATH"] = '/opt/oracle/instantclient_12_1'
end 
set :repository, "ssh://gituser@example.com/opt/git/hub/app.git"
set :deploy_to, "/srv/www/#{application}"
set :deploy_via, :copy
set :keep_releases, 5

set :scm, "git"
set :branch, "master"

after 'deploy:update_code', 'deploy:symlink_shared', "deploy:migrate","deploy:restart"

他能够使用capistrano部署其他应用程序,我们正在使用capistrano 2.

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有