0

这是我的 Development.rb 文件

  # In the development environment your application's code is reloaded on
  # every request. This slows down response time but is perfect for development
  # since you don't have to restart the web server when you make code changes.
  config.cache_classes = false

  # Log error messages when you accidentally call methods on nil.
  config.whiny_nils = true

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false
  config.assets.digest = true
  config.serve_static_assets = false

出于某种原因,即使在开发环境中,我的 CSS 文件也被缓存了,我不知道为什么

4

2 回答 2

3

遇到类似问题:Javascript 文件被 Rails 服务器缓存

解决方案(如 TheIrishGuy 所述):

  1. 停止 Rails 服务器
  2. $rake tmp:缓存:清除
  3. 启动 Rails 服务器
  4. 浏览器中的 Crtl+F5
于 2013-09-11T13:49:35.867 回答
1

您是否预编译了任何资产?如果是这样,请检查公共资产文件夹并删除。

尝试清除 /tmp/cache/assets

确保浏览器没有缓存 application.css、强制刷新等

于 2013-08-06T14:51:30.983 回答