1

I am trying to set up Rails 5 with bootstrap-sass.

app/assets/application.scss:

@import "bootstrap-sprockets";
@import "bootstrap";

config/initializers/assets.rb:

Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompile += %w(*.js *.css)

I get following error: Sass::SyntaxError ... Undefined variable: "$alert-padding". This is because of *.css in precompile.

But if I leave only %w(*.js) Rails will still compile my controller specific stylesheets. I am happy because it will but why will it do this?

Nondv
  • 769
  • 6
  • 11
  • Why are you compiling everything (rather than just the manifests(s) ? – Frederick Cheung Apr 17 '16 at 12:55
  • @FrederickCheung, I wanna use controller-specific assets. So, in manifests (like `application.js`, right?) I dont include all tree. Is there a better way to do this? – Nondv Apr 17 '16 at 20:09

0 Answers0