Compass / compass-rails

compass rails integration
MIT License
591 stars 276 forks source link

When using :scss + sass-rails the sass_importer.rb patch now blows up #238

Closed reidnimz closed 8 years ago

reidnimz commented 9 years ago

I'm using: compass-rails 2.0.4 sass-rails 5.0.1 haml-rails 0.8.2

When I attempt to use an :scss block in a haml template, I get the following error: uninitialized constant Haml::Filters::SassImporter

The reason seems to be the following commit in sass-rails that made Sass::Rails::SassTemplate no longer a subclass of Sprockets::SassTemplate https://github.com/rails/sass-rails/commit/e123a3948f44fdb73ef2f90d2da771b4bffbe06f

I believe that the fix (which works for me locally) is to remove the class selection at the top of sass_importer.rb and just go with Sprockets::SassTemplate.class_eval(...) but I'm not very familiar with most of what is going on in here, so I wanted to check with folks familiar with the code to find out if that would break something (@twalpole I'm tagging you because you made the change).

There is a related but in the haml-rails project: https://github.com/indirect/haml-rails/issues/77 - but I'm pretty sure the change should happen in compass-rails.

I'll try and submit a PR as soon as I'm able.