我有生产 Rails 3.2.3 应用程序,我用它来使用 capistrano 进行部署。当我决定将 Rails 升级到 3.2.11 时,我执行了以下步骤:
- 更改 Gemfile 中的 Rails 版本
- 运行“捆绑更新轨道”
- 从供应商/缓存、Gemfile 和 Gemfile.lock 推送新的 gem
- 运行“上限生产部署”
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 进行部署,结果相同。
My Gemfile 和deploy.rb https://gist.github.com/4509574
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。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)