I am having some trouble pre-compiling assets for a new Rails 6 app I'm working on.
My application.scss looks like this:
@import 'vars';
@import 'bootstrap';
@import 'bootstrap_overrides';
@import 'font_awesome5.css';
@import 'base';
@import 'dashboard';
# etc...
but upon deploying to production with Capistrano, the asset pre-compilation step fails with the following:
SassC::SyntaxError: Error: Undefined variable: "$padding"
on line 18:12 of app/assets/stylesheets/base.scss
>> padding: $padding;
-----------^
The $padding variable is defined in vars.scss:
$padding: 60px 0px;
and, as mentioned, is being imported in application.scss. Why would other files complain that it's necessary if application.scss is already importing it?
The app works fine in development.
Thanks in advance!