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

Renay Kumar
Renay Kumar
5,226 Points

Terminal can't recognise my test.scss file. Error message. (Sass)

When i run sass test.scss in the terminal, it comes up with an error message saying there is no such file or directory. I am pretty sure i have installed Sass correctly.

Not sure what's wrong.

3 Answers

Ethan Lowry
PLUS
Ethan Lowry
Courses Plus Student 7,323 Points
  1. Are you definitely in the same directory as your sass file?
  2. Do you have the Sass gem installed?
  3. Try supplying your intended output file as well e.g. sass input.scss output.css or possibly use something like sass --watch input.scss:output.css to update the generated file every time you edit your sass file.

Source: Sass Reference

Renay Kumar
Renay Kumar
5,226 Points

Thanks! Realised i was in the wrong directory.

Cody Peterson
Cody Peterson
7,641 Points

I had the same problem and so I ran "cd desktop" without the quotes into the terminal then I ran "sass test.scss" again and that solved the problem.

Jordyn Archer
Jordyn Archer
7,168 Points

Thanks Cody! cd desktop did the trick!

Sharon Smith
Sharon Smith
8,747 Points

It could be that you're in the wrong directory. It could also be that if you're on a Windows machine & used Notepad for the file, you might have saved with the wrong encoding. The default is ANSI, which means it looks like a text file to the computer no matter what ending you put on it. If you change the encoding to UTF-8, then it'll recognize it as a Sass file.