2014-01-23 38 views
0

看起来好像cache_classes => false仍然会缓存它们,我必须关闭并重新启动服务器以查看所有更改。有任何想法吗?我真的被卡住了,这是一个非常烦人的问题。Rails:cache_classes => false仍然高速缓存

development.rb看起来是这样的:

Total::Application.configure do 
    config.cache_classes = false 
    config.whiny_nils = true 
    config.threadsafe! 
    # Add the fonts path 
    config.assets.paths << Rails.root.join('app', 'assets', 'fonts') 
    # Precompile additional assets 
    config.assets.precompile += %w(.svg .eot .woff .ttf) 
    config.serve_static_assets = true 
    # Show full error reports and disable caching 
    config.consider_all_requests_local  = true 
    config.action_controller.perform_caching = false 
    # config.eager_load = false 
    config.action_mailer.default_url_options = { :host => 'lvh.me:3000' } 
    config.action_mailer.delivery_method = :smtp 
    config.action_mailer.perform_deliveries = true 
    config.action_mailer.raise_delivery_errors = true 
    config.action_mailer.default :charset => "utf-8" 
    config.action_mailer.smtp_settings = { 
    address: "smtp.gmail.com" # ETC 
    } 
    config.active_support.deprecation = :log 
    config.action_dispatch.best_standards_support = :builtin 
    config.active_record.mass_assignment_sanitizer = :strict 
    config.assets.compress = false 
    config.assets.debug = true 
end 

任何帮助将是巨大的。谢谢。

回答

0

如果其他人有这个问题,解决方案是命令:config.threadsafe!必须在config.cache_classes之前。重新排序像这样来解决它:

... 
config.threadsafe! 
config.cache_classes = false 
... 

更新

这仅仅是因为config.threadsafe!做到这一点:

def threadsafe! 
    @preload_frameworks = true 
    @cache_classes  = true 
    @dependency_loading = false 
    @allow_concurrency = true 
    self 
end 

什么的线程安全确实看到here

+0

这固定了我的一切。任何想法为什么? – jahrichie

+0

好的,我会更新我的答案。 –

+0

我尝试过这样做,并且让事情变得更糟,例如,所有rake任务都停止工作。这不是一个解决方案。 – jahrichie