ruby-on-rails – Capistrano gzip:stdin:意外结束文件中断

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Capistrano gzip:stdin:意外结束文件中断前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有Capistrano部署的问题.部署过程正在被丢弃,并出现Gzip错误.

它能是什么?

cap flow deploy 

* executing `flow' 
* executing `deploy' 
* executing `deploy:update' 
** transaction: start 
* executing `deploy:update_code' 
* getting (via checkout) 
revision to /tmp/20111214204507 
executing locally: cp -R . /tmp/20111214204507 
c    ommand finished in 413ms 
compressing /tmp/20111214204507 to /tmp/20111214204507.tar.gz 
executing locally: tar chzf 20111214204507.tar.gz 20111214204507 
command finished in 2419ms 
servers: ["10.11.10.10"] 
Password: ** sftp upload /tmp/20111214204507.tar.gz -> /tmp/20111214204507.tar.gz 
[10.11.10.10] /tmp/20111214204507.tar.gz 
[10.11.10.10] done * sftp upload complete * executing "cd /home/tieto/dvs_production/releases && tar xzf /tmp/20111214204507.tar.gz && rm /tmp/20111214204507.tar.gz" 
servers: ["10.11.10.10"] 
[10.11.10.10] executing command 
[err :: 10.11.10.10] 
[err :: 10.11.10.10] gzip: 
[err :: 10.11.10.10] stdin: unexpected end of file 
[err :: 10.11.10.10] tar: 
[err :: 10.11.10.10] Child returned status 1 
[err :: 10.11.10.10] 
[err :: 10.11.10.10] tar: 
[err :: 10.11.10.10] Error exit delayed from prevIoUs errors 
[err :: 10.11.10.10] 
command finished in 62ms 
[deploy:update_code] rolling back * executing "rm -rf /home/flow/production/releases/20111214204507; true" 
servers: ["10.11.10.10"] 
[10.11.10.10] executing command 
command finished in 69ms 
Failed: "sh -c 'cd /home/flow/production/releases && tar xzf /tmp/20111214204507.tar.gz && rm /tmp/20111214204507.tar.gz'" on 10.11.10.10

解决方法

答案在这里,如果您或其他人尝试本地部署仍然遇到此问题:
http://f3internet.com/articles/2010/06/18/deploying-static-sites-with-capistrano/

这行[10.11.10.10]完成了* sftp上传完成*执行“cd / home / tieto / dvs_production / releases&& tar xzf /tmp/20111214204507.tar.gz>& rm /tmp/20111214204507.tar. gz“正试图同时解压缩并删除临时副本.

解决方案是在同一台机器上定义本地/远程复制目录:

set :copy_dir,"/home/#{local_user}/tmp"
set :remote_copy_dir,"/tmp"

猜你在找的Ruby相关文章