2014-06-19 13 views
5

Mentre la distribuzione di un'applicazione Rails con Capistrano su Ubuntu 14.04, sto ottenendo il seguente errore: fileCapistrano percorso di destinazione esiste già, non una directory vuota

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. 

Qui sono config:

Il 012.333.per questo errore che posso trovare online è;

Che presumo non si adatta con i file di configurazione di cui sopra.

risposta

11

Ho avuto lo stesso problema. Il motivo è nella doppia definizione del ruolo e/o del server. Provare a rimuovere

server 'SERVER-IP', user: 'USERNAME', roles: %w{app} 

in production.rb e

role :app, "SERVER-IP" 

in deploy.rb. Quest'ultima sembra essere una semplice sintassi mentre la prima - è estesa, quindi in effetti si dichiarano i ruoli due volte (tre per essere più precisi: 2 in production.rb e 1 in deploy.rb). Spero che sia d'aiuto.

+0

Grazie @leger. Ho rimosso le 2 righe precedenti, ma l'errore persiste ancora durante l'implementazione. Anche se penso di essere sulla strada giusta ora, sono rimasto bloccato per le ultime 3 ore. –

+3

Provare ad eliminare APP-NAME sul server tramite 'rm -rf' e ridistribuire. Ho eseguito tutte le mie iterazioni in questo modo, fino a quando la distribuzione non ha avuto esito positivo. A volte con 'sudo reboot' :) – Leger

+0

Woah !!! Finalmente. Beatitudine. : D –

Problemi correlati