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

CSS Sass Basics (retired) Getting Started with Sass Installing and Using Sass

"sass --watch ." Not working

I'm running Windows 7 (sass 3.3.8 and ruby 2.0.0p481 x64-mingw32) and it initially creates the css file but will not recognize any changes I make to the .scss file.

I am navigating to the folder containing the test.scss file and these are the command variations I am trying (with no success): 1.) sass --watch . 2.) sass --watch test.scss:test.css

6 Answers

Today I reran gem sass install and it suddenly started working; perhaps a bug fix was recently released.

Viaceslav Vasiljev
Viaceslav Vasiljev
7,913 Points

If anyone else has this problem this helped me Solution: Uninstall - sass [gem uninstall sass] Install - sass version 3.4.0 [gem install sass -v 3.4.0]

Chris Shaw
Chris Shaw
26,676 Points

Hi Corey,

Could you post the full command you're using or are you just using sass --watch by itself? If that's the case you need to specify the input file to use and the location of where you want SASS to create the compiled .css file.

http://sass-lang.com/documentation/file.SASS_REFERENCE.html#using_sass

I am navigating to the folder containing the test.scss file and these are the command variations I am trying (with no success): 1.) sass --watch . 2.) sass --watch test.scss:test.css

Chris Shaw
Chris Shaw
26,676 Points

Sorry for the delay, one thing you may want to check is if you have wdm installed which stands for Windows Directory Monitor, if you don't have that installed SASS won't be able to track your changes.

gem install wdm

Installing Windows Directory Monitor does not seem to have fixed the problem.

Chris Shaw
Chris Shaw
26,676 Points

You may need to restart Windows after installing it, apart from that I can't off the top of my head think of anything else that would cause the watcher to not work without throwing an error as every time the SCSS file updates in the file system wdm triggers a change event that SASS watches for.

The problem still persists and I do not receive any errors

The problem still persists and I do not receive any errors.

Brad Woods
Brad Woods
13,772 Points

I was having the same problem as you. The console would not log any changes on a file that is on the desktop, but will for a file in a different directory. Also the changes wouldn't show up on the css file created by --watch if that file was opened in notepad. That file being opened in notepad++ would only show the changes after about a 10sec lag period and with a prompt from notepadd++

I still haven't fixed it. It doesn't matter what folder the file is in, it just won't update in the console or the file. Let me know if you find a solution.

What directory did you create the .scss file in, and are trying to run watch from?

It didn't work for me when I had the file in my Downloads directory (under my user directory), but worked when I moved and ran everything from a C:\Dev\ directory...

Maybe give that a shot?

The problem has since mysteriously resolved but at the time the directory made no difference.