rails开发环境不会在更改时重新加载视图

时间:2021-03-04 19:23:02

I mucked around my development environment enough that now I have to restart my server every time I make a modification to the views or controllers. This is a pain with lots of small changes.

我在我的开发环境中做了大量的工作,现在我必须在每次修改视图或控制器时重新启动服务器。这是一个有很多小变化的痛苦。

Now even when my development.rb is back to the original one, the views,controllers need a restart to see the changes. I am not sure what is going on.

即使是我的发展。rb回到了原来的视图,控制器需要重新启动才能看到更改。我不知道发生了什么事。

Any help would really appreciated as it is slowing my development.

任何帮助都会让我感激,因为它正在阻碍我的发展。

Thanks

谢谢

Here's my environment.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'

My development.rb looks like:

我的发展。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

I tried starting mongrel_start using verbose mode but it didn't help:

我尝试使用冗长模式启动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

1 个解决方案

#1


5  

In my development.rb

在我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

So, I guess you have to make it false

所以,我猜你得把它写错

#1


5  

In my development.rb

在我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

So, I guess you have to make it false

所以,我猜你得把它写错