Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Sass 3.3 compatible with Compass?

I have just upgraded to Sass 3.3 so that I can use some of the new features (BEM styled class names, mappings, @at-root, etc). If I compile my project with Sass (via sass --watch), it works just fine. However, if I compile it using Compass (via compass watch), I get an error when using the new Sass features.

I'm using Compass 0.12.

like image 868
magicspon Avatar asked Mar 15 '14 17:03

magicspon


1 Answers

Compass 0.12 explicitly depends on Sass 3.2. Even if you have a newer version of Sass installed, it will still compile with 3.2. In order to use Sass 3.3 or later, you have to be using Compass 1.0 or later.

Running the gem install command normally should get you the latest stable version.

gem install compass

At the time this question was asked, Compass 1.0 was still in beta. To install the latest beta version of a gem, you will need to install it using the --pre flag.

gem install compass --pre

Note that you do not need to install Sass first in order for this to work. Installing Compass will automatically install the latest version of Sass that it is compatible with.

I have Compass 1.0 installed and it still errors

  • Double check any other dependencies you might have (Compass extensions, etc.), one of them might be specifying an older version of Sass or Compass.
  • If you're using an application or build tool rather than using the commands directly, make sure they're not referencing older versions of Compass.

Windows users

As a Window user, I got an error when I tried to watch my project using the newer Compass.

LoadError on line ["36"] of C: cannot load such file -- wdm"

To fix that problem:

You must install the ruby DevKit: Download found here: http://rubyinstaller.org/downloads/

Follow this page to properly install: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Now install wdm:

gem install wdm
like image 58
Mygel Bergstresser Avatar answered Oct 01 '22 14:10

Mygel Bergstresser