Sass --compass --watch Error: Unable to load compass

I work with sass and compass and try to use the new sourcemap function, since Chrome 27 requires the new sourcemap method to show the actual sass files and line numbers in the Chrome console panel.

I can run the following command sass sass --sourcemap --watch style.scss:style.css

however, if I add the argument --compass as follows sass --compass --sourcemap --watch style.scss:style.css

The following error appears in the cmd windows panel: "ERROR: Unable to load compass."

I tried following some of the methods that seemed to work for some people on the github problem page https://github.com/chriseppstein/compass/issues/1108

The methods I tried to use use sass 3.3.0.alpha.177 with compass 0.12.2 (this causes an error every time I try to execute the compass stone, which is almost identical to this problem Why does the “compass clock” say that it doesn’t can load sass / script / node (LoadError)? )

Currently my setup is this:

  • sass 3.3.0.alph.177
  • compass 0.13.alpha.4
  • Windows 7

Is there a way that I can use Sass with a compass and at the same time generate the source maps that are needed to debug css?

+6
source share
4 answers

Works with Sass 3.3.0.alph.149 and compass 0.12.2 on windows 7

+5
source

The versions mentioned in @ lollerskates666 work, but I had to specifically remove sass version 3.3.4, which came down when I installed the compass.

If someone else, if you have this problem, I had to run the following rules to make it work:

 gem install compass --version 0.12.2 

This sets the compass as well as Sass 3.3.4 (Maptastic Maple). These two versions, combined with --sourcemap, do not seem to play well, so you need to install an older version of Sass:

 gem install sass --pre --version 3.3.0.alpha.149 

Although you have already installed it, follow these steps:

 sass --v 

Ruby will still use Sass 3.3.4, so you will need to uninstall this version:

 gem uninstall sass **Select number assigned to version 3.3.4** 

Now if you run:

 sass --v 

You should see:

 Sass 3.3.0.alpha.149 (Bleeding Edge) 

Sass should now work with libc compass, as well as create source maps that Chrome can read :)

I ran this command to view my scss files:

 sass --watch --sourcemap --compass --style compressed scss:css 

Hope this helps!

** I run this on Mac, but the same versions work fine :)

+1
source

I found that I have two versions of Sass installed (3.4.25 and 3.5.5). I was getting an error when using grunt, which used the latest version 3.5.5. I solved the problem by uninstalling 3.5.5.

gem uninstall sass

 Select gem to uninstall: 1. sass-3.4.25 2. sass-3.5.5 3. All versions 
+1
source

There was this problem. gem 'sass', '~> 3.2.19' worked on a previously created application. I resorted to using this instead of gem 'sass', '~> 3.4.16 , which was automatically generated during application creation 3.2.22 and caused this problem.

So there is a problem with the version.

0
source

Source: https://habr.com/ru/post/947009/


All Articles