Undefined mixin 'am-avatar'
Closed this issue · 1 comments
I had my active_material theme working completely ok, but after I installed a CMS gem https://github.com/owen2345/camaleon-cms, I'm getting the following SASS error on my application:
Undefined mixin 'am-avatar'.
Extracted source (around line #2):
1
2
3
.avatar {
@include am-avatar;
}
Rails.root: /Users/paulitolinhares/github/thrillism/thrillism-backend
Application Trace | Framework Trace | Full Trace
/Users/paulitolinhares/.rvm/gems/ruby-2.3.1/bundler/gems/active_material-c67d6854259b/app/assets/stylesheets/active_material/components/avatar.scss:2:in `am-avatar'
/Users/paulitolinhares/.rvm/gems/ruby-2.3.1/bundler/gems/active_material-c67d6854259b/app/assets/stylesheets/active_material/components/avatar.scss:2
sass (3.4.22) lib/sass/tree/visitors/perform.rb:351:in `block in visit_mixin'
sass (3.4.22) lib/sass/stack.rb:98:in `block in with_mixin'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:98:in `with_mixin'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:349:in `visit_mixin'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block (2 levels) in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `map'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:181:in `with_environment'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:431:in `visit_rule'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `map'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `visit_children'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:169:in `block in visit_children'
I tried to recompile the assets with rake assets:precompile
, but no luck. It seems that active_material.scss it's not being imported anymore on my SASS file.
Here is my application.css.scss
file:
@import 'active_admin'
and active_admin.scss
:
// SASS variable overrides must be declared before loading up Active Admin's styles.
//
// To view the variables that Active Admin provides, take a look at
// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
// Active Admin source.
//
// For example, to change the sidebar width:
// $sidebar-width: 242px;
// Active Admin's got SASS!
@import "active_admin/mixins";
// @import "active_admin/base";
@import "active_material"
// Overriding any non-variable SASS must be done after the fact.
// For example, to change the default status-tag color:
//
// .status_tag { background: #6090DB; }
both files reside on the app/assets/stylesheets/application.css.scss
of my rails app.
Hmm. I have no clue, but it looks like adding an underscore in front of file names is a suggested fix:
owen2345/camaleon-cms#579 (comment)
I've pushed up a branch that underscores all of the modules under active_material
. Like _color.scss
instead of color.scss
. Could you pull it down and give it a try?
In your gemfile, include active_material
like this:
gem 'active_material', github: 'vigetlabs/active_material', branch: 'underscore-prefix'