I am trying to deploy my rails application for production and I am trying to precompile all assets:
My assets.rb file:
Rails.application.config.assets.precompile += %w( *.css.sass ) Rails.application.config.assets.precompile += %w( *.css.scss ) Rails.application.config.assets.precompile += %w( *.css ) Rails.application.config.assets.precompile += %w( *.js ) Rails.application.config.assets.precompile += %w( *.js.coffee ) Rails.application.config.assets.precompile += %w( *.js.coffee.erb )
However, when I try to deploy using capistrano, I get the following error:
DEBUG[c79c6191] rake aborted! DEBUG[c79c6191] Sass::SyntaxError: Undefined variable: "$alert-padding".
In my assets.rb file, before that, I added each file separately by file, and the deployment worked, however I import some resources into the layout file:
<%= javascript_include_tag 'application', 'jquery-ui-1.9.2', 'js-example', 'js-example2', 'data-turbolinks-track' => true %>
But I also import some using asterisks:
//= require jquery //= require bootstrap-sprockets //= require angular //= require jquery_ujs //= require turbolinks //= require_tree .
This method worked well when I developed the application, but when I deploy the production application, it seems that the material that I import with asterisks is not imported (i.e. Angular)
Thanks in advance.
EDIT: as requested by my application.css.scss file:
@import "bootstrap-sprockets"; @import "bootstrap"; @import "font-awesome";
EDIT2: I also followed this method: bootstrap-sass: Undefined variable: "$ baseLineHeight" , but I need it to precompile all assets.