问题
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