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 –