我有生产Rails 3.2.3应用程序,我用它来使用capistrano进行部署。当我决定将rails升级到3.2.11时,我做了以下步骤:
Capistrano现在失败并出现错误:
* 2013-01-11 15:58:25 executing `deploy:assets:precompile'
triggering before callbacks for `deploy:assets:precompile'
* 2013-01-11 15:58:25 executing `deploy:assets:update_asset_mtimes'
* executing "[ -e /home/deploy/projects/otv/shared/assets/manifest.yml ] && cat /home/deploy/projects/otv/shared/assets/manifest.yml || echo"
servers: ["xxx.xxx.99.51"]
[xxx.xxx.99.51] executing command
command finished in 28ms
* executing "cd -- /home/deploy/projects/otv/releases/20130111095812 && export LANG=en_US.UTF-8 && /usr/local/bin/bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/deploy/projects/otv/shared/assets/manifest.yml /home/deploy/projects/otv/releases/20130111095812/assets_manifest.yml"
servers: ["xxx.xxx.99.51"]
[xxx.xxx.99.51] executing command
** [out :: xxx.xxx.99.51] cp: cannot stat ‘/home/deploy/projects/otv/shared/assets/manifest.yml’: No such file or directory
command finished in 18773ms
我尝试使用其他项目执行这些步骤,这些项目之前已成功使用capistrano进行部署并具有相同的结果。
答案 0 :(得分:4)
FWIW,我在将Capistrano更新为>后得到了这个。 2.14.0:
*** [err :: ourapp.net] cp: cannot stat `/home/deploy/www/ourapp/shared/assets/manifest.yml'
*** [err :: ourapp.net] : No such file or directory
我认为将资产混合到共享目录会修复它,但不是乱搞(得到这个部署),我只是将上限降级回2.13.5。
答案 1 :(得分:1)
我遇到了同样的问题。
新版本的capistrano现在有some code来处理共享资源路径符号链接。
我的config/deploy.rb
有一些代码来处理这个问题,并且路径相互冲突。
我刚从它中删除了这一行来解决问题:
run "ln -nfs #{shared_path}/public/assets #{release_path}/public/assets"
答案 2 :(得分:0)
在升级之前,您是否删除了远程服务器上的所有资产?
有时一些旧的引用可能会导致这种问题
干杯, 的Jérémy