jetheredge / SquishIt

Lets you *easily* bundle some css and javascript! Check out the Google group if you have questions!
http://groups.google.com/group/squishit
MIT License
459 stars 119 forks source link

SquishIt.Sass and compass error #249

Open jonespen opened 10 years ago

jonespen commented 10 years ago

Importing compass throws an error:

Sass::SyntaxError

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: IronRuby.Classes.SystemException$1: Sass::SyntaxError

Bundle code:

<%= Bundle.Css()
    .Add("/compass.scss")
    .Render("/styles_#.css")
%>

compass.scss

@import "compass";

Is compass supported? Or am I doing something wrong? Regular .scss files work.

AlexCuse commented 10 years ago

I'm not familiar with compass. Have you tried renaming your file to compass.sass? I know the two are processed slightly differently.

Do you know if compass requires a certain version of SASS?

jonespen commented 10 years ago

Compass is a popular framework for Sass that add a lot of useful helpers (like image spriting). It is installed as a ruby gem, and imported with the @import "compass"; command. I haven't found out what version of SASS Compass requires, but from the changelog it looks like it need at least SASS 3.1.

System.Web.Optimization has it's own package for it, called Web.Optimization.Bundles.Compass.

AlexCuse commented 10 years ago

Hmm, ok. We use the "sass in one" file lifted from @xpaulbettsx's SassAndCoffee repo (https://github.com/xpaulbettsx/SassAndCoffee/blob/master/SassAndCoffee.Ruby/Sass/lib/sass_in_one.rb) and I'm not sure what version it is.

I will see if I can figure something out before the next release.

anaisbetts commented 10 years ago

Compass attempts to monkey-patch Sass, which is why it's hard to get it to work as I recall.

AlexCuse commented 10 years ago

Ah, the plot thickens.

I guess that could probably explain why the package linked above relies on Ruby being installed, instead of using IronRuby.

AlexCuse commented 9 years ago

There is a new libsass-based version of SquishIt.Sass out that might fix your problem. I can't find anything definitive on whether compass works with libsass in 2 minutes of searching but I am pretty out of touch in that area.