Precompile assets with same digest on different hosts

老子叫甜甜 提交于 2019-12-11 03:33:37

问题


Is it possible to compile assets on different hosts (traffic routing) with the same digest?

For example, if my Rails 3.2 app is deployed to 2 different hosts host1 and host2, I want to have application.css on both host1 and host2 with the same digest application-34a9sadas1238023a8.css


回答1:


The digest is going to be the same for each host because it is based on the content of the file.

If you are deploying to multiple hosts, the assets will get precompiled on both during deployment.

If you want to avoid this because of the time it takes, there is a way to compile locally and commit, and still have development mode work as expected. It is here.



来源:https://stackoverflow.com/questions/10692348/precompile-assets-with-same-digest-on-different-hosts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!