Ruby on rails 服务于旧页面的Rails

Ruby on rails 服务于旧页面的Rails,ruby-on-rails,Ruby On Rails,当我打开缓存时,Rails服务于我网站主页的旧版本。当我关闭缓存时,Rails服务于页面的正确版本。我的production.rb文件中有以下配置: # Code is not reloaded between requests config.cache_classes = true config.static_cache_control = "public, max-age=3600" # Full error reports are disabled and caching is turn

当我打开缓存时,Rails服务于我网站主页的旧版本。当我关闭缓存时,Rails服务于页面的正确版本。我的production.rb文件中有以下配置:

# Code is not reloaded between requests
config.cache_classes = true
config.static_cache_control = "public, max-age=3600"

# Full error reports are disabled and caching is turned on
config.consider_all_requests_local       = false
config.action_controller.perform_caching = true

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true

# Compress JavaScripts and CSS
config.assets.compress = true
config.assets.css_compressor = :yui
config.assets.js_compressor = :uglify

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true

# Generate digests for assets URLs
config.assets.digest = true

有人知道发生了什么吗?

正如您所说,Rails正在为您的页面提供缓存版本


您需要使这些缓存页面过期;试试rake tmp:cache:clear。

它对我不起作用。这很奇怪,因为像这样提供服务的唯一页面就是主页。登陆页面,找到了!我在公用文件夹中有一个旧的index.html。我删除了它并运行rake-tmp:cache:clear。谢谢