Rails using cached application.css despite changes

后端 未结 9 605
萌比男神i
萌比男神i 2020-12-30 00:53

I have a Rails 3.1 application that uses SASS. The application.css.scss file looks like:

@import \'reset.css\';
@import \'960.css\';
@import \'p         


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-30 01:33

    To wipe out the asset pipeline cache, a brute force rm -rf tmp/* will suffice. This has certainly fixed a few otherwise inexplicable CSS and JavaScript glitches in my experience. As a preventative measure, it might also be a good idea to clear the cache after upgrading gems or changing the asset pipeline configuration, although this may just be superstition.

    Finally, if you are experimenting with rake assets:precompile in your development environment (more on this in a later article), you’ll also want to rm -rf public/assets/* afterwards to clean that up.

    http://blog.55minutes.com/2012/02/untangling-the-rails-asset-pipeline-part-1-caches-and-compass/

提交回复
热议问题