In my Rails 3.2.1 application I am using compass(0.12.alpha.4) to create sprites:
@import compass
@import "../images/category-icons/type/*.png"
@include all-type-sprites
//+all-type-sprites
The sprite image was genereated correctly, sitting in app/assets/images/category-icons/type-sa69c4767de.png
However the stylesheet generated is wrong. It points to /assets/../images/category-icons/type-sa69c4767de.png
. It merely appends assets
to the path. It works outside of Rails, so I think it has something to do with asset pipeline. What should I configure for this to work properly?
http_generated_images_path
? I had a similar issue and it was resolved by setting the http config paths.app/assets
means I don't have to try to exclude those files from version control. Don't forget to add the new path to rails assets paths.generated_images_dir = "tmp/sass-cache/sprites"
inconfig/compass.rb
.config.assets.paths += "tmp/sass-cache/sprites" in
config/application.rb`.