ruby-on-rails-3.2 – Capistrano删除资产

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3.2 – Capistrano删除资产前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
每次我做一个上限:部署Capistrano正在删除我的资产,说他们不需要.实际上它们是必需的,为了让它们恢复,我必须做一个上限:资产:每次我执行上限后预编译:部署,否则我的网站没有样式或图像.

这是什么:normalize_asset_timestamps在部署期间不起作用:finalize_update?

Capistrano v2.14.1,Rails v3.2.11

** Removing assets that haven't been deployed for 10080 minutes...
* executing ...
** [out :: server.com] comm:
** [out :: server.com] file 2 is not in sorted order
** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css
** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css.gz
** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js
** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js.gz
** [out :: server.com] Removing unneeded asset: application.css
** [out :: server.com] Removing unneeded asset: application.css.gz
** [out :: server.com] Removing unneeded asset: application.js
** [out :: server.com] Removing unneeded asset: application.js.gz

解决方法

这是解决方案: https://github.com/capistrano/capistrano/pull/422

要么添加

after "deploy","assets:precompile"

在deploy.rb的末尾,等待capistrano gem更新

或者在你的capistrano宝石中添加2行

或者你可以直接从github更新capistrano

gem 'capistrano',git: 'https://github.com/capistrano/capistrano.git'

我不会推荐

猜你在找的Ruby相关文章