5
虽然在Ubuntu 14.04中部署与Capistrano的一个Rails应用程序,我收到以下错误:Capistrano的目标路径已经存在,不是一个空目录
fatal: destination path '/var/www/APP-NAME/repo' already exists and is not an empty directory.
cf5a389e] Running /usr/bin/env [ -f /var/www/rd/repo/HEAD ] on LINODE-INSTANCE-IP
DEBUG[cf5a389e] Command: [ -f /var/www/rd/repo/HEAD ]
DEBUG[cf5a389e] Finished in 0.005 seconds with exit status 1 (failed).
DEBUG[8899b95c] Running /usr/bin/env if test ! -d /var/www/rd; then echo "Directory does not exist '/var/www/rd'" 1>&2; false; fi on LINODE-INSTANCE-IP
DEBUG[8899b95c] Command: if test ! -d /var/www/rd; then echo "Directory does not exist '/var/www/rd'" 1>&2; false; fi
DEBUG[8899b95c] Finished in 0.005 seconds with exit status 0 (successful).
INFO[fc5f524b] Running /usr/bin/env git clone --mirror GIT_REPO_URL /var/www/APP-NAME/repo on LINODE-INSTANCE-IP
DEBUG[fc5f524b] Command: cd /var/www/APP-NAME && (GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rd/git-ssh.sh /usr/bin/env git clone --mirror GIT-REPO-URL /var/www/APP-NAME/repo)
DEBUG[fc5f524b] fatal: destination path '/var/www/APP-NAME/repo' already exists and is not an empty directory.
下面是配置文件:
的only reason这个错误我可以在网上找到;
same host in more than one role, so that they're racing? For example I mean that you might have the same IP address defined as an :app role host more than once.
我认为这不符合上述配置文件。
谢谢@leger。我删除了上述2行,但仍然错误部署仍然存在。虽然我认为我现在走在了正确的轨道上,但在过去的3个小时里一直困在这里。 –
尝试通过'rm -rf'删除服务器上的APP-NAME并重新部署。我以这种方式运行了所有迭代,直到最终成功完成部署。有时用'sudo reboot' :) – Leger
Woah !!!最后。极乐。 :D –