I can't understand why my css file is not appending digests to my assets with the helper method image_url
My assets are correctly precomiled, and files do contain the digest. I also can access them (with the digested url) manually. And most strange thing is that in the beginning it was working.
here's my configs:
config.assets.js_compressor = :uglifier
config.assets.compile = false
config.assets.digest = true
config.assets.version = '1.0'
config.serve_static_assets = false #also tried true
here's my application.css: *= require_tree .
here's the common.scss file, used for including an image:
body{
background: image_url('bg.jpg');
font-family: 'Lato', sans-serif;
overflow-x: hidden;
}
The images, as well as the stylesheets are in a subfolder inside assets/images and assets/stylesheets.
here my gems:
gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
I'm deploying with capistrano, but I don't think this is a capistrano related problem, assets are well compiled.
EDIT What i've (unsuccessfully) tried until now:
image-url('image.jpg'); -> http://www.mydomain.it/images/image.jpg
image_url('image.jpg'); -> same as above
url(image-path('header.jpg')); -> http://www.mydomain.it/images/image.jpg
asset-url('image.jpg', image); -> http://www.mydomain.it/image.jpg
problem still remains: assets are compiled but requested without digest.
EDIT
Following this question Rails 4 image-path, image-url and asset-url no longer work in SCSS files I moved around my assets and using the combination of asset-url and putting my assets in /public folder, background images are working, even though the problem still remains as the application is not using the timestamped version of the images. So only a (not that good, nor that bad) workaround.