From a03397ff7fac7bb7d53ac298f40c14ff6c84c5da Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 27 Apr 2009 16:14:13 -0300 Subject: [PATCH] ActionItem980: loading schema from scratch --- config/environment.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/environment.rb b/config/environment.rb index df68b36..5f7f2e0 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -64,7 +64,11 @@ Rails::Initializer.run do |config| # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector - config.active_record.observers = :article_sweeper + + # don't load the sweepers while loading the database + unless $PROGRAM_NAME =~ /rake$/ && ARGV.first == 'db:schema:load' + config.active_record.observers = :article_sweeper + end # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc -- libgit2 0.21.2