Skip to content

A platform for community discussion. Free, open, simple.

FIX: catch NoMethodError during precompile_css too (#9940)

Aman Gupta Karmani6358e79f0f74
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 4261d69450b..67788e3cf86 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -57,7 +57,7 @@ task 'assets:precompile:css' => 'environment' do
STDERR.puts "Compiling css for #{db} #{Time.zone.now}"
begin
Stylesheet::Manager.precompile_css
- rescue PG::UndefinedColumn, ActiveModel::MissingAttributeError => e
+ rescue PG::UndefinedColumn, ActiveModel::MissingAttributeError, NoMethodError => 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