Сбой развертывания приложения Rails 3 на Capistrano - PullRequest
0 голосов
/ 16 августа 2011

Я запускаю команду локально

> cap deploy:setup

и Capistrano успешно создает удаленные каталоги (release /, shared /). Но когда я запускаю команду развертывания, я получаю следующую ошибку:

bash-3.2# 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@github.com:username/example.git master"
    command finished in 3425ms
  * executing "if [ -d /srv/www/example.com/example/shared/cached-copy ]; then cd /srv/www/example.com/example/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 45c2bb2c2725176e86ccd55add53a25084053342 && git submodule -q init && for mod in `git submodule status | awk '{ print $2 }'`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done && git submodule -q sync && git submodule -q update --init --recursive && git clean -q -d -x -f; else git clone -q git@github.com:panayi/example.git /srv/www/example.com/example/shared/cached-copy && cd /srv/www/example.com/example/shared/cached-copy && git checkout -q -b deploy 45c2bb2c2725176e86ccd55add53a25084053342 && git submodule -q init && git submodule -q sync && git submodule -q update --init --recursive; fi"
    servers: ["example.com"]
Password: 
    [example.com] executing command
 ** [example.com :: out] No submodule mapping found in .gitmodules for path 'example.com'
    command finished in 5732ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /srv/www/example.com/example/releases/20110816145830; true"
    servers: ["example.com"]
    [example.com] executing command
    command finished in 331ms
failed: "sh -c 'if [ -d /srv/www/example.com/example/shared/cached-copy ]; then cd /srv/www/example.com/example/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 45c2bb2c2725176e86ccd55add53a25084053342 && git submodule -q init && for mod in `git submodule status | awk '\\''{ print $2 }'\\''`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done && git submodule -q sync && git submodule -q update --init --recursive && git clean -q -d -x -f; else git clone -q git@github.com:panayi/example.git /srv/www/example.com/example/shared/cached-copy && cd /srv/www/example.com/example/shared/cached-copy && git checkout -q -b deploy 45c2bb2c2725176e86ccd55add53a25084053342 && git submodule -q init && git submodule -q sync && git submodule -q update --init --recursive; fi'" on example.com

1 Ответ

1 голос
/ 16 августа 2011

Я подозреваю, что это результат того, как вы настроили свое git-репо.

Здесь ошибки:

 No submodule mapping found in .gitmodules

Читать это:

В .gitmodule не найдено отображение подмодулей для пути, который не является подмодулем

и это:

Git - как отслеживать неотслеживаемый контент?

следуйте инструкциям и повторите попытку.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...