Search code examples
rubyrakeruby-on-rails-5asset-pipelinespree

Asset Pipeline Breaking After Adding Spree to Rails App


I am attempting to precompile my assets after adding the spree gem to my Rails 5 app. It was running fine before I added it, but now I can't get my assets to precompile.

application.scss

@import "bootstrap-sprockets";
@import "bootstrap";
@import "bootsy";
@import "theme";
@import "dropzone";
@import "font-awesome";
@import "spree/frontend/all";
@import "spree/backend/all";
@import "essentials";
@import "custom";

This is what I get with the rake assets:precompile command

rake aborted!
Sass::SyntaxError: Undefined variable: "$navbar-height".
/Users/username/.rvm/gems/ruby-2.4.1/gems/spree_backend-3.3.0/app/assets/stylesheets/spree/backend/components/_sidebar.scss:3

Solution

  • The problem was a conflict in the boostrap-sprockets call. Removing that import solved the issue.