首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Capistrano部署Rails 3应用程序失败

Capistrano部署Rails 3应用程序失败
EN

Stack Overflow用户
提问于 2011-08-16 23:03:55
回答 1查看 773关注 0票数 0

我在本地运行该命令

代码语言:javascript
复制
> cap deploy:setup

Capistrano成功地创建了远程目录(release/、shared/)。但是,当我发出部署命令时,我得到以下错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-08-16 23:15:49

我怀疑这是你设置git repo的方式造成的。

它的错误如下:

代码语言:javascript
复制
 No submodule mapping found in .gitmodules

请阅读以下内容:

No submodule mapping found in .gitmodule for a path that's not a submodule

还有这个:

Git - how to track untracked content?

按照此处的说明进行操作,然后重试。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7080415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档