Skip to content

Commit

Permalink
FIX: Add additional rescue for assets:precompile
Browse files Browse the repository at this point in the history
This error can be caused if assets are precompiled before the database has been migrated
  • Loading branch information
davidtaylorhq committed Mar 7, 2019
1 parent ad87b0d commit bc52437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/assets.rake
Expand Up @@ -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
Expand Down

2 comments on commit bc52437

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/can-custom-css-cause-an-error-when-trying-to-upgrade/110867/6

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/can-custom-css-cause-an-error-when-trying-to-upgrade/110867/7

Please sign in to comment.