2014-01-23 33 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