[英]Capistrano fails when trying to deploy Rails asset manifest
I'm trying to deploy a Rails app that has worked successfully before, but Capistrano is barfing during deployment. 我正在尝试部署之前成功运行的Rails应用程序,但Capistrano在部署期间正在进行攻击。 I don't believe I've changed anything other than changing the Rails app code itself and updating some gems (ie the deploy.rb file is identical to a once-working setup.) 除了更改Rails应用程序代码本身和更新一些宝石之外,我不相信我已经改变了任何东西(即deploy.rb文件与曾经工作的设置相同。)
Here's the line it appears to fail on: 这是看起来失败的线:
executing "cp -- /u/apps/myapp/shared/assets/manifest.yml /u/apps/myapp/releases/unable/assets_manifest.yml"
Notice how the directory it's trying to copy to is called unable
. 请注意,它是如何试图复制目录称为unable
。 It's like it can't get the new release name/date or something? 这就像它无法获得新版本的名称/日期或其他东西? And yet earlier it executes this without error: 但是之前它执行它没有错误:
executing "cd -- /u/apps/myapp/releases/20130507041223 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
The remainder of the interesting output is this: 剩余的有趣输出是这样的:
** cp: cannot create regular file `/u/apps/myapp/releases/unable/assets_manifest.yml'
** No such file or directory
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cp -- /u/apps/myapp/shared/assets/manifest.yml /u/apps/myapp/releases/unable/assets_manifest.yml'"
UPDATE: This appears to be a bug in Capistrano 2.15.4. 更新:这似乎是Capistrano 2.15.4中的一个错误。 Downgrading to version 2.14.2 fixed the problem. 降级到版本2.14.2解决了问题。 I've detailed the bug here: 我在这里详细说明了这个错误:
https://github.com/capistrano/capistrano/issues/468 https://github.com/capistrano/capistrano/issues/468
This appears to be a bug in Capistrano 2.15.4. 这似乎是Capistrano 2.15.4中的一个错误。 Downgrading to version 2.14.2 fixes the problem. 降级到2.14.2版本可以解决问题。 See https://github.com/capistrano/capistrano/issues/468 请参阅https://github.com/capistrano/capistrano/issues/468
Had the same problem with 2.15.4. 与2.15.4有同样的问题。 It was because I had changed my hostname to something invalid - everytime i su'd it told me 'unable to resolve host ' which this version of cap was picking up for some reason. 这是因为我把我的主机名更改为无效的东西 - 每次我都告诉我“无法解决主机”这个版本的上限由于某种原因而上升。 Setting the hostname back to the proper setting seems to have sorted it. 将主机名设置回适当的设置似乎已对其进行了排序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.