Hey Everyone,
We recently updated our rails application from 1.1.2 to 1.2.2. While
running in development mode prior to the update, class reloading in
development mode worked properly. However, after the update we now
have to restart the web server for changes to take effect.
our development.rb:
config.cache_classes = false
Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
Enable the breakpoint server that script/breakpointer connects to
config.breakpoint_server = true
Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
config.action_view.debug_rjs = true
Let us know about problems in action_mailer, since they could be
errors filling templates, not just problems delivering mail.
config.action_mailer.raise_delivery_errors = true
I tried loading up the configuration in the console. I think that
the syntax that I used should load up the rails configuration the same
way that script/server does, but I am not an expert. What is
interesting to me, is that it seems to be properly loading the
cache_classes parameter as false.
config = Rails::Configuration.new
=> #<Rails::Configuration:0x312de5c @whiny_nils=false,
@cache_classes=false, @action_view=[], @log_level=:debug,
@database_configuration_file=“script/…/config/…/config/…/config/
database.yml”, @breakpoint_server=false, @view_path=“script/…/
config/…/config/…/app/views”, @action_mailer=[],
@load_once_paths=[], @plugin_paths=[“script/…/config/…/config/…/
vendor/plugins”], @controller_paths=[“script/…/config/…/config/…/
app/controllers”, “script/…/config/…/config/…/components”, “/Users/
nathan/dev/indigo/trunk/vendor/rails/railties/builtin/rails_info/”],
@active_record=[], @action_controller=[], @load_paths=[“script/…/
config/…/config/…/test/mocks/development”, “script/…/config/…/
config/…/app/controllers/”, “script/…/config/…/config/…/app”,
“script/…/config/…/config/…/app/models”, “script/…/config/…/
config/…/app/controllers”, “script/…/config/…/config/…/app/
helpers”, “script/…/config/…/config/…/app/apis”, “script/…/
config/…/config/…/components”, “script/…/config/…/config/…/
config”, “script/…/config/…/config/…/lib”, “script/…/config/…/
config/…/vendor”, “/Users/nathan/dev/indigo/trunk/vendor/rails/
railties/builtin/rails_info/”], @plugins=nil, @action_web_service=[],
@log_path=“script/…/config/…/config/…/log/development.log”,
@frameworks=[:active_record, :action_controller, :action_view,
:action_mailer, :action_web_service]>Rails::Initializer.run(:process, config)
=> #<Rails::Initializer:0x312acfc
@loaded_plugins=[“acts_as_attachment”, “exception_notification”,
“searchable”], @configuration=#<Rails::Configuration:0x312de5c
@whiny_nils=true, @cache_classes=false,
@action_view=[[:cache_template_extensions, false], [:debug_rjs,
true]], @log_level=:debug, @database_configuration_file=“script/…/
config/…/config/…/config/database.yml”, @breakpoint_server=true,
@view_path=“script/…/config/…/config/…/app/views”,
@action_mailer=[[:raise_delivery_errors, true]], @load_once_paths=[],
@plugin_paths=[“script/…/config/…/config/…/vendor/plugins”],
@controller_paths=[“script/…/config/…/config/…/app/controllers”,
“script/…/config/…/config/…/components”, “/Users/nathan/dev/indigo/
trunk/vendor/rails/railties/builtin/rails_info/”], @active_record=[],
@action_controller=[[:consider_all_requests_local, true],
[:perform_caching, false]], @load_paths=[“script/…/config/…/
config/…/test/mocks/development”, “script/…/config/…/config/…/app/
controllers/”, “script/…/config/…/config/…/app”, “script/…/
config/…/config/…/app/models”, “script/…/config/…/config/…/app/
controllers”, “script/…/config/…/config/…/app/helpers”, “script/…/
config/…/config/…/app/apis”, “script/…/config/…/config/…/
components”, “script/…/config/…/config/…/config”, “script/…/
config/…/config/…/lib”, “script/…/config/…/config/…/vendor”, “/
Users/nathan/dev/indigo/trunk/vendor/rails/railties/builtin/
rails_info/”], @plugins=nil, @action_web_service=[],
@log_path=“script/…/config/…/config/…/log/development.log”,
@frameworks=[:active_record, :action_controller, :action_view,
:action_mailer, :action_web_service]>>config.cache_classes
=> falseRAILS_ENV
=> “development”exit
If the config.cache_classes property is getting set properly, why
would class reloading in development mode stop working between the
versions?
I do not know what other diagnostic information would be useful to
resolve this problem, please let me know. I googled a bit and was
unable to find anyone having similar problems.
-Nathan