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

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.

EDIT: Scratch that, nevermind.

3 Answers

  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

Thanks! Realised i was in the wrong directory.

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.

Thanks Cody! cd desktop did the trick!

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.