第一次capistrano部署失败

时间:2013-09-09 13:46:15

标签: ruby-on-rails capistrano

我第一次部署到新服务器似乎失败了,出现以下错误消息:

failed: "sh -c 'cat /var/www/my_project/production/current/REVISION'" on 192.xxx.xxx.xxx

这不是我的第一次capistrano部署,不记得之前遇到过这样的事情......任何修复这个问题的指针都会非常感激。

以下是部署日志

的更多信息
 [192.xxx.xxx.xxx] executing command
    command finished in 1202ms
    triggering after callbacks for `deploy:finalize_update'
  * 2013-09-09 18:54:37 executing `postgresql:symlink'
  * executing "ln -nfs /var/www/my_application/production/shared/config/database.yml /var/www/my_application/production/releases/20130909132425/config/database.yml"
    servers: ["192.xxx.xxx.xxx"]
    [192.xxx.xxx.xxx] executing command
    command finished in 1042ms
    triggering after callbacks for `deploy:update_code'
  * 2013-09-09 18:54:38 executing `deploy:assets:precompile'
  * executing "cat /var/www/my_application/production/current/REVISION"
    servers: ["192.xxx.xxx.xxx"]
    [192.xxx.xxx.xxx] executing command
    command finished in 1039ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/my_application/production/releases/20130909132425; true"
    servers: ["192.xxx.xxx.xxx"]
    [192.xxx.xxx.xxx] executing command
    command finished in 1103ms
failed: "sh -c 'cat /var/www/my_application/production/current/REVISION'" on 192.xxx.xxx.xxx

cap deploy:check已成功运行

“您似乎已安装所有必需的依赖项”

2 个答案:

答案 0 :(得分:1)

遇到了这里发布的问题:

https://github.com/capistrano/capistrano/issues/224

capistrano error: ...../current: No such file or directory

必须对第一次部署的deploy/assets行发表评论。

答案 1 :(得分:0)

您是如何部署的? 应首先使用deploy:cold

部署到服务器
cap deploy:cold