2011-02-17 34 views
3

我繞過我的開發環境,現在每次修改視圖或控制器時都必須重新啓動服務器。這是一個有很多小變化的痛苦。rails開發環境無法重新載入更改視圖

現在,即使當我的development.rb回到原來的版本,控制器需要重新啓動才能看到更改。 我不確定發生了什麼事。

任何幫助將真正讚賞,因爲它是放緩我的發展。

感謝

這裏是我的environment.rb:

config.time_zone = 'Eastern Time (US & Canada)' 
config.cache_classes = true 
ENV['NLS_LANG']='american_america.AL32UTF8' 
config.i18n.default_locale = :en 
config.gem "authlogic" 
config.gem "matthuhiggins-foreigner", :lib => "foreigner" 
config.gem "memcache-client", :lib => "memcached" 
end 

require "will_paginate" 
require "RedCloth" 
require "authlogic" 
require 'memcached' 

我development.rb樣子:

config.cache_classes = true 
config.whiny_nils = true 
config.action_controller.consider_all_requests_local = true 
config.action_view.debug_rjs       = true 
config.action_controller.perform_caching    = false 
#cache only the models to avoid nil.include? errors in development mode. 
config.load_once_paths += %W( #{RAILS_ROOT}/app/models ) 

# Don't care if the mailer can't send 
config.action_mailer.raise_delivery_errors = false 

config.after_initialize do 
Workling::Remote.dispatcher = Workling::Remote::Runners::StarlingRunner.new 
end 

我試着用詳細模式啓動mongrel_start,但它並沒有幫助:

mongrel_rails start -B 
** Starting Mongrel listening at 0.0.0.0:3000 
** Installing debugging prefixed filters. Look in log/mongrel_debug for the files. 
** Starting Rails with development environment... 
** Rails loaded. 
** Loading any Rails specific GemPlugins 
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). 
** Rails signals registered. HUP => reload (without restart). It might not work well. 
** Mongrel 1.1.5 available at 0.0.0.0:3000 

回答

5

在我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 webserver when you make code changes. 
config.cache_classes = false 

所以,我想你必須使它false

+0

感覺如此愚蠢現在:)有它一直盯着很長一段時間,並沒有發現它是假的。需要另一雙眼睛來發現愚蠢。感謝您指出。 – truthSeekr 2011-02-17 18:06:39

相關問題