views:

40

answers:

1

This is a theoretical question as much as a practical one. I just can't wrap my head around how all these technologies mesh...

I have heard various things including:

So my question is: ...WHAT??

I do have SASS working in Merb. I have installed Compass and used the instructions on Chris Eppstein's Github wiki to get it working. But why is Compass needed, and why do many sources seem to think that it is not needed and SASS support is built into HAML or Merb?

+1  A: 

"HAML and SASS are included in Merb"

No, they are separate.

"SASS is part of HAML"

Sass and Haml, while technically pretty different libraries, come bundled together. They are both part of the haml gem. So you need to install that gem to use Sass. Note that that doesn't require you to actually use Haml in your application.

"HAML works in Merb, but to use SASS you need to add the 'merb-haml' dependency"

It's actually the other way round. You can use Haml in merb by installing the merb-haml gem. This adds Haml-specific merb generators and plugs into merbs templating. Sass however only requires the haml dependency (in config/dependencies.rb) for it to work with merb.

"You need Compass to run SASS in Merb"

Not true. Compass is a framework built on top of Sass. It has tons of general purpose functions for CSS styling. But you don't need Compass to use Sass. You can take a look at the docs.

igorw
This is very informative! :) Thanks. So if Compass is not required, how do I get Merb to generate the stylesheets from SASS? I have stylesheets/sass/style.sass and have a link to the corresponding stylesheet/style.css but it's not being converted, and I get "Controller class not found for controller `stylesheets'.
mltsy
Scratch that! It does work! I still had my stylesheet link pointing to 'stylesheets/compiled/...' However, I will now change that stylesheet location in init.rb - http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#options
mltsy