Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Jitendra Vyas
Jitendra Vyas
2,349 Points

Sass::SyntaxError: Undefined mixin 'mixin_name'

I'm working on a Rails 4 project where I'm using Sass and Sass's @import to combine multiple css into one. It works fine but not if I use a new partial for mixins (_mixins.css.scss) and @import this in main.css.scss only and use mixins any other file which is added after that _webapp.css.scss

@import "bootstrap/bootstrap";
@import "responsive/mega_menu";
@import "responsive/mixins";
@import "responsive/webapp";

Rails Precompilation process is unable to found "responsive/mixins" and gives error in _webapp.css.scss

Sass::SyntaxError: Undefined mixin 'mixin_name'. here mixin_name is defined in responsive/mixins

1 Answer

The order of your imports might be the problem. If "responsive/mega_menu" is calling for that mixin(mixin_name) then you're going to get an error.

Jitendra Vyas
Jitendra Vyas
2,349 Points

That is not the problem in my case.