Search code examples
ruby-on-railsruby-on-rails-3.1lessasset-pipeline

Is it possible to force generation of assets with Rails Asset Pipeline?


Is there a way to force regeneration of assets every request when using the Rails 3.1 Asset Pipeline?

I am having problems getting the system to pick up changes to files when using Less (less-rails) with a series of partials and mixin files. If I could just force the system to generation on each request I would be much more productive.


Solution

  • I worked it out.

    The master.less file (as in the main less file that coordinates the other include files) needed to have the pipeline directives added to it.

    So in my case, application.css contains:

    /*
     *= require html5reset-1.6.1
     *= require master
    */
    

    And master.css.less contains:

    /*
     *= depend_on mixins
    */
    @import "mixins";