openHPI / codeharbor

Exchange of Programming Exercises acrossdiverse Code Assessment Systems through CodeHarbor
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Fix Asset precompilation #235

Closed MrSerth closed 4 years ago

MrSerth commented 4 years ago

Up to now, all assets machine the pattern '*.js', '*.css', '*.css.erb', '*.coffee', '*.scss' were precompiled. That yielded an error during deployment after merging #230:

Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as codeharbor@codeharbor.xi.xopic.de: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
SassC::SyntaxError: Error: Undefined variable: "$navbar-height".
        on line 16:16 of ../../shared/bundle/ruby/2.6.0/gems/rails_admin-2.0.1/app/assets/stylesheets/rails_admin/base/theming.scss
>>   padding-top: $navbar-height;

   ---------------^

This is related to this issue in rails_admin suggesting not to precompile all assets.

Hence, I disabled that behavior with f378a18 and tested the result in the production environment locally without error. Nevertheless, we should evaluate whether no other assets are required and update production.rb accordingly.

kkoehn commented 4 years ago

The only thing that does not seem to work on a quick walk through locally is ACE, I'll double check and try to fix it