From bc52437153adbded95e5a61dc63ee8bd2bf3cfda Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 7 Mar 2019 14:03:05 +0000 Subject: [PATCH] FIX: Add additional rescue for assets:precompile This error can be caused if assets are precompiled before the database has been migrated --- lib/tasks/assets.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 0e2c6525df..2815f4440c 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -58,7 +58,7 @@ task 'assets:precompile:css' => 'environment' do STDERR.puts "Compiling css for #{db} #{Time.zone.now}" begin Stylesheet::Manager.precompile_css - rescue PG::UndefinedColumn => e + rescue PG::UndefinedColumn, ActiveModel::MissingAttributeError => e STDERR.puts "#{e.class} #{e.message}: #{e.backtrace.join("\n")}" STDERR.puts "Skipping precompilation of CSS cause schema is old, you are precompiling prior to running migrations." end