Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Sass --watch command error (Windows) (Solved)

So I installed Sass (version 3.3.7 (Maptastic Maple)), but when I run sass --watch (in the ruby command line) it doesn't update test.css. Instead of overwrite ./test.css it just prints write ./test.css even though I installed rb-fsevent. I looked elsewhere in the forum and some people had the same problem, but their solutions didn't work for me.

When I type sass --watch . (or some other version of that command) it doesn't detect changes and the test.css file that is created doesn't change. When I input sass test.scss it's the same as the video (Installing and Using Sass) and displays the css. Retrying the command made the previous changes to the css file but is still unresponsive to further changes. (My OS is Windows 8.1, I'm in the desktop directory, and I selected the css file in Sublime 2.)

It would help a lot if this could be resolved.

6 Answers

Misty Majewski
Misty Majewski
5,276 Points

This may not be the problem you are having but in the command prompt. What does it say.. When I start it always says c:\users\misty.. This does not work.. I have to change it to desktop. So I have to type in cd c:users\misty\desktop. After I hit return then the command prompt changes to desktop and then I can watch a file. This may not be your issue but it is a good start.

At first (before this discussion) I had that issue. I figured it out the solution though and saw many other people with the same problem. Thanks anyway.

blago
blago
3,729 Points

It's hard to say what is the problem ,but here are the steps to get up and runing with Sass and Compass on Windows.

  1. Go to rubyinstaller.org
  2. Download and install Ruby on Windows machine(x64 or x86 depends on your machine)
  3. When installing check the checkbox with "Add ruby executables to your PATH
  4. Open Command Propmt and type gem install sass or gem install compass(this automatically install Sass)
  5. Navigate to your project folder and type sass --watch or with compass compass watch

If you did all this steps correct it should work but maybe you will need to install ruby DevKit too, I have some strange problems on my Windows 7 too and after installing DevKit all works correctly.

Where could I find DevKit?

blago
blago
3,729 Points

Instruction for installation-https://github.com/oneclick/rubyinstaller/wiki/Development-Kit Download-http://rubyinstaller.org/downloads/ at the bottom of the page you will see title DEVELOPMENT KIT

I am currently installing the development kit but I would like to know which command prompt to use (ruby or normal).

I installed the DevKit but it's still not working. The problem might be that I didn't add Ruby executables to my PATH. Not sure if I did that. Should I reinstall Ruby and make sure to do that this time?

blago
blago
3,729 Points

yes try that, but you should also follow installation instructions for DevKit very carefully. you have a good tutorial for installing sass here http://www.impressivewebs.com/sass-on-windows/

Thanks, that really helped. Even though the installation seemed the same as first time, their must be something different I did the second. It works fine now but should I install DevKit again for other reasons?

By the way it seems the command line still prints write instead of overwrite for some reason, but works anyway.

blago
blago
3,729 Points

You don't need if it works correctly. I use the latest Compass 1.0.0.alpha.19 , I assume that is the reason why I needed to install DevKit to work properly on Windows 7, after I installed it I haven't had any problems with Sass and Compass. If you decide to switch to latest Compass maybe you will experience some problems and than try install ruby DevKit. Cheers