How to clear Sprockets cache?

前端 未结 3 1983
花落未央
花落未央 2021-01-01 10:46

When a Sprockets object compilation fails (due to a syntax error in CoffeeScript or SASS), it cannot recompile after the error is fixed because it says \"file is already req

相关标签:
3条回答
  • 2021-01-01 11:06

    rake tmp:cache:clear deletes the temporary cache directory.

    0 讨论(0)
  • 2021-01-01 11:09

    In my case, the following command worked:

    rake tmp:clear
    
    0 讨论(0)
  • 2021-01-01 11:12

    It should be:

    Rails.application.assets.cache.clear
    

    but this method only in master branch and not even in beta.

    Update: added in 4.0.0.beta5.

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