gpt4 book ai didi

ruby-on-rails - Capistrano 部署未完成

转载 作者:行者123 更新时间:2023-12-04 05:59:02 24 4
gpt4 key购买 nike

我想使用 Capistrano 将本地应用程序部署到生产服务器。但是有些事情失败了,我不知道如何解决它。好消息是/shared/cached-copy完全在远程服务器上创建。我该如何修复 rsync错误?

cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@bitbucket.org:foo/bar.git HEAD"
* executing "if [ -d /path/foo/shared/cached-copy ]; then cd /path/foo/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard e216d5f840f3d78458a3734a3830a4030750c85c && git clean -q -d -x -f; else git clone -q git@bitbucket.org:foo/bar.git /path/foo/shared/cached-copy && cd /path/foo/shared/cached-copy && git checkout -q -b deploy e216d5f840f3d78458a3734a3830a4030750c85c; fi"
servers: ["foo.com"]
[foo.com] executing command
command finished in 33589ms
copying the cached version to /path/foo/releases/20120204063129
* executing "rsync -lrpt --exclude=\".git\" --exclude=\".DS_Store\" --exclude=\".gitignore\" --exclude=\".gitmodules\" /path/foo/shared/cached-copy/ /path/foo/releases/20120204063129 && (echo e216d5f840f3d78458a3734a3830a4030750c85c > /path/foo/releases/20120204063129/REVISION)"
servers: ["foo.com"]
[foo.com] executing command
*** [err :: foo.com] rsync: mkdir "/path/foo/releases/20120204063129" failed: No such file or directory (2)
*** [err :: foo.com] rsync error: error in file IO (code 11) at main.c(587) [Receiver=3.0.8]
*** [err :: foo.com] rsync: connection unexpectedly closed (9 bytes received so far) [sender]
*** [err :: foo.com] rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.8]
command finished in 899ms
*** [deploy:update_code] rolling back
* executing "rm -rf /path/foo/releases/20120204063129; true"
servers: ["foo.com"]
[foo.com] executing command
command finished in 841ms
failed: "sh -c 'rsync -lrpt --exclude=\".git\" --exclude=\".DS_Store\" --exclude=\".gitignore\" --exclude=\".gitmodules\" /path/foo/shared/cached-copy/ /path/foo/releases/20120204063129 && (echo e216d5f840f3d78458a3734a3830a4030750c85c > /path/foo/releases/20120204063129/REVISION)'" on foo.com

我的 deploy.rb文件:
set :application, "FooBar"
set :repository, "git@bitbucket.org:foo/bar.git"
set :scm, :git
set :deploy_to, "/path/foo"
set :deploy_via, :remote_cache
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules"]
set :user, "foobar"
server "foobar.tdl", :app
ssh_options[:forward_agent] = true

最佳答案

看起来你的第一个错误是:

*** [err :: foo.com] rsync: mkdir "/path/foo/releases/20120204063129" failed: No such file or directory (2)

您的 /path/foo/releases服务器上已经存在目录?尝试创建它。

关于ruby-on-rails - Capistrano 部署未完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9139036/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com