A
A
Anton Misyagin2015-08-26 02:01:41
Ruby on Rails
Anton Misyagin, 2015-08-26 02:01:41

Set up compass paths?

Trying to set up paths in a rails app for my sprites.
Icons for sprites are in Rails.root/images
config/assets.rb:
Rails.application.config.assets.paths << 'images'
config/initializers.compass.rb:

Compass.configuration.generated_images_dir = 'public/dev-assets/sprites' if Rails.env.development?

I do rake assets:precompile
Collect css files, add to /public/dev-assets
Collect sprites, add to /public/dev-assets/sprites
Links to sprites go to css:
background-image: url(/icons-xxx.png)
Correct background-image: url(sprites/icons-xxx .png) (no slash before the sprites), then the page is rendered correctly.
The problem is that the compass settings described here seem to be ignored (except for generated_images_dir, it reacts to it). Those. I try different options:
relative_asset =true/false
http_path = any
http_generated_images_path = different
and other settings at random
tmp/cache/assets clear before compiling
Nothing changes. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Misyagin, 2015-09-07
@sunnmas

Answer is here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question