【发布时间】:2020-05-24 02:56:04
【问题描述】:
每当我更改包含的.scss 文件时,即使我重新启动服务器,我也看不到更改。我发现如果我手动删除tmp/cache/*然后重新启动服务器,我可以看到一次更改。未显示进一步的更改(并且缓存又回来了)。我试过rails server --no-dev-caching,但没有帮助。我有
config.assets.digest = false
config.assets.debug = false
config.assets.quiet = false
config.assets.raise_runtime_errors = true
config.action_controller.perform_caching = false
config.cache_store = :null_store
在开发中重新加载页面时如何查看 SCSS 文件的更改?我使用 curl http://localhost:3000/assets/application.css | less 进行测试并搜索我更改并保存的类。
=> Booting Puma
=> Rails 5.0.7.2 application starting in development on http://localhost:3000
* Version 3.12.2 (ruby 2.4.3-p205), codename: Llamas in Pajamas
* Environment: development
文档:https://guides.rubyonrails.org/v5.0/configuring.html#configuring-assets
我注释掉了 Puma,使用了带有 rails server --no-dev-caching 的 WebBrick,设置了 config.assets.debug = true,加载了 $ curl http://localhost:3000/assets/theme/theme.self.css | less,但更改仍然不存在。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-5 windows-8.1