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 CSS to Sass Installing Sass and Setting up the Project The --watch Command

Gina Mills
Gina Mills
15,668 Points

Help! Not writing to css folder

Hey guys, I'm going the scss course. When I type in the command

sass --watch scss:css

I only get the first line which never completes and just goes on forever basically.

Sass is watching for changes. Press Ctrl-C to stop.

I'm sure my folders are name correctly. I've tried moving the files. I've restarted the terminal, I've even updated ruby again but none of it is making a difference. It's just not working. Please help! I can't figure it out.

  • Gina

3 Answers

Gina Mills
Gina Mills
15,668 Points

I figured it out! It turns out the mac was hiding the .css extension and refusing to name it. To fix it I opened the thing in sublime text made a new file and renamed it as .scss as a new file, deleted the old one

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Well done and welcome to the wonderful world of Sass!

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Hi Gina,

The watch command runs a process that checks for any changes made upon saving your .scss files and rewrites your generated .css file

There are three parts to using the watch command:

  1. In the terminal using the command line '''sass --watch scss:css''' and pressing enter initiates the watch command.
  2. Back in your sass file(s) make changes and save your file
  3. In the terminal pressing the keys Ctrl-C stops the watch process
Gina Mills
Gina Mills
15,668 Points

Hey charl,

Thanks for your help. I tried doing that but it's still not writing the file. It's not writing the initial steps that are in the video ie. style.css and style.css.map. How do I get it to do that? it's not linked or updating etc

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Hey Gina,

It seems you are not the only one experiencing this issue with sass. I scanned the internet and found others with the same issue. Also ran a test (installing sass, etc) and had the same result: but then it all of a sudden started working… Bit of an "IT Crowd" request: Have you tried turning it of and on again? Perhaps restart your machine and retry the process.

Gina Mills
Gina Mills
15,668 Points

Haha, thanks so much for your hard work! Yes I looked into it too and ended up restarting it, but that also did not work. Oh well I guess I'm never using sass lol