sass-rails asset pipeline: generating image paths incorrectly; `url(/images/blah.png)` instead of `url(/assets/blah.png)`

前端 未结 8 1008
南笙
南笙 2021-01-01 17:31

In section 2.2.2, \"CSS and Sass\", I\'m told to put image-url(\'delete.png\') in my sass. And so I have.

However, it is generating CSS like

<         


        
8条回答
  •  一个人的身影
    2021-01-01 17:58

    This looks to be due to your version of sass-rails (3.1.0). I can reproduce your problem (thanks for posting the Gemfile) and it goes away when bumping to sass-rails 3.1.4.

    Try upgrading to 3.1.4 and clearing tmp/cache. Also make sure you're not hitting any browser caches.

    I know you said 3.1.4 was causing other problems... have you tried higher versions?

提交回复
热议问题