我正在使用Rails 3.1并开发了一年半的时间。今天早上我一定做了一些事情,现在好像我的很多文件似乎都被缓存了。这包括视图文件,控制器和模型。Rails:控制器和模型似乎被缓存在开发中
我可以在模型,控制器等进行更改,它不会对我的应用程序(在本地主机上运行:3000)产生任何影响。我试图切换端口(例如本地主机:3005),但它没有工作。
我没有改变任何配置文件或在我的电脑(Mac,Lion)上做出任何大的改动,但显然我必须做点什么。
- 我在开发模式
- 我在Mac
- 公共文件夹是空的,除了
- 我删除了/缓存/资产文件夹 404页等使用的TextMate工作
- 我已经删除了我的浏览器上的缓存
重新启动服务器使其工作,总是!有时(非常少见)更改会在不重新启动的情况下生效。
这是我development.rb:
# Settings specified here will take precedence over those in config/application.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
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
什么可能会发生,如何解决或解决呢?
设置“config.cache_classes =真”,然后回到虚假似乎暂时解决了这个问题......可能是一个线索? – Christoffer 2012-08-13 11:39:46
你是否设法解决这个问题,我们发生了完全相同的事情,它似乎是计算机专用的。在我的电脑上,它在我的同事电脑上工作,它不断缓存课程。 – DickieBoy 2012-08-23 16:42:35