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