missing fingerprints in asset paths

只谈情不闲聊 提交于 2019-12-06 05:07:50

问题


We just deployed a Rails 3.1 app using the new asset pipeline. In Development everything looks fine, but in production all asset-images are missing. When deploying we followed the Ruby on Rails Edge Guide. As an example, a simple code snippet from our app:

asset_path "favicon.png", "images"

This generates in production:

/assets/favicon.png

But the fingerprint is missing (and therefore it is a deadlink on production). We already tried it without the "images", with image_tag instead. Nothing is working.

Additional Information:

  • Rails Version 3.1.0

Already looked at and tried:

  • https://github.com/rails/rails/issues/1209
  • Rails 3.1 and Image Assets
  • Rails 3.1 Asset Pipeline and Caching

回答1:


The recent Railscast Episode #282 covered switching assets from 3.0 to 3.1 with asset pipeline. Have you already tried setting config.assets.digest = true in config/environments/production.rb?



来源:https://stackoverflow.com/questions/7336265/missing-fingerprints-in-asset-paths

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