Answer the question
In order to leave comments, you need to log in
How to fix SCSS compilation error in Rails 4.1?
Hello.
The structure is like this:
application.css.scss
_vars.css.scss
sizes/
_mobile.css.scss
_desktop.scss.scss
# application.css.scss
@import 'bootstrap';
@import 'font-awesome';
@import 'videojs/dist/video-js/video-js.css.scss';
@import 'vars';
@import 'sizes/mobile';
@media (min-width: 992px) { @import 'sizes/desktop'; }
# Ошибка
Sass::SyntaxError: Undefined variable: "$body_nav_padding".
(in app/assets/stylesheets/application/sizes/_mobile.css.scss:2)
Answer the question
In order to leave comments, you need to log in
The jamb was in this line:
Removed the redundant and earned:
Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf|swf)$/
you should only compile application.css.scss
compilers are trying to separately compile the files that you include
in the assets in the config, you need to specify what to compile
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question