我已经尝试了很多禁用 Rails 中的 sprocket 资源缓存,但没有成功。我尝试配置development.rb,但它根本不起作用。
我正在使用此代码来禁用缓存生成
config.assets.cache_store = :null_store # Disables the Asset cache
config.sass.cache = false # Disable the SASS compiler cache
红宝石版本=2.3.3
导轨版本=5.0.1
提前致谢。
根据Rails 文档 http://guides.rubyonrails.org/asset_pipeline.html#assets-cache-store,将以下代码块添加到您的environments/development.rb中
config.assets.configure do |env|
env.cache = ActiveSupport::Cache.lookup_store(:null_store)
end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)