Rails using cached application.css despite changes

后端 未结 9 562
萌比男神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:41

    Random I was having a caching issue related to using twitter bootstrap and application.css.scss. Basically I changed application.css.scss to just plain application.css and fixed my problem. Maybe this can help you? If you haven't figured it out already.

    0 讨论(0)
  • 2020-12-30 01:45

    I had a similar issue with Rails 6.0.3.1 today. I had to re-touch application.scss so that rails didn't use the cached version.

    Running rake tmp:cache:clear helped, but it's annoying because I had to run the command every time I updated any partial scss file. :(

    0 讨论(0)
  • 2020-12-30 01:49

    I was having this problem, but I was actually putting css into application.css, rather than into files that it included. I cleared out application.css to simply include all of my css. So, my application.css now looks like this:

    /*
     * This is a manifest file that'll be compiled into application.css, which will include all the files
     * listed below.
     *
     * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
     * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
     *
     * You're free to add application-wide styles to this file and they'll appear at the top of the
     * compiled file, but it's generally better to create a new file per style scope.
     *
     *= require_self
     *= require 'bootstrap.min'
     *= require 'global'
     */
    

    My changes are reflected any time I change one of the included files (e.g. global.css)

    0 讨论(0)
提交回复
热议问题