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

Martin Forbes
PLUS
Martin Forbes
Courses Plus Student 4,750 Points

sass not finding test file as per video

sigh...

I KNEW sass would be a problem for me....

I simply CANNOT get it to work. Finally, I've got it to install, now that I have I've saved an empty file with SublimeText 2 on the desktop with the file named test.scss. As the video showed I now type; Desktop$ sass test.scss yet continually this is the error message that I get:

Last login: Thu Jan 30 23:28:43 on ttys001 Martins-iMac:~ martinforbes$ sass --version Sass 3.2.14 (Media Mark) Martins-iMac:~ martinforbes$ Desktop$ sass test.scss -bash: Desktop$: command not found Martins-iMac:~ martinforbes$ Desktop$ sass test.scss -bash: Desktop$: command not found Martins-iMac:~ martinforbes$

All I want to do is get it to work so that I can get through thisDeep Dive and onto working with saas properly, it seems that its 1 step forwards 2 steps back :( I've asked for help on a similar issue and james the moderator was kind enough to respond but I can't keep on going back to him as its not fair to do that.

Thanks

Chris Dziewa
Chris Dziewa
17,781 Points

You are missing a part of the command. Type in:

sass --watch test.scss

6 Answers

Martin Forbes
PLUS
Martin Forbes
Courses Plus Student 4,750 Points

Thanks Chris, sorry for not getting back to you sooner as I've been a wee bit busy as off late. I'll try to do what you've mentioned when I can.

Thanks again.

Chris Dziewa
Chris Dziewa
17,781 Points

No worries! You should also check out the scout program if you aren't comfortable in the Terminal as it is supposed to keep you away from the command line.

María Pérez de Arrilucea
María Pérez de Arrilucea
6,490 Points

Hi, I tried:

Desktop$ sass test.scss
Desktop$ sass --watch test.scss

None of them work for me:

Desktop$: command not found

Maybe I wrote something wrong?

Thanks!!

María Pérez de Arrilucea
María Pérez de Arrilucea
6,490 Points

Ok, I know what happened, I feel a bit stupid now :)

  • Desktop$: that's the name of the teacher's computer, so it shouldn't be part of your command.
  • As I don't know how to access a file on my desktop via terminal, I placed it on the root of my computer

Then I wrote

sass test.scss

Edit: If you want to place the documents on your desktop these are the commands that worked for me

For testing the scss file

sass ./Desktop/test.scss

For watching the changes in the css file

sass --watch ./Desktop
Chris Dziewa
Chris Dziewa
17,781 Points

A better way to do it is to navigate to the folder in the terminal. You can then watch the entire folder which will look for any changes in any of the scss files. use the command ls to see files in the current directory and then cd foldername to go to a different directory. I highly recommend doing the console foundations course if you haven't already.

if I had a folder called sass with another folder inside named mysass that contained my Sass files, then I could simply type cd sass/ followed by sass --watch mysass on the next line.

Martin Forbes
PLUS
Martin Forbes
Courses Plus Student 4,750 Points

Hi,

I've been away for 2 weeks and now that I'm back quelle suprise... it's still not working. So far I've typed in sass --watch test.scss and nothing happens, which is what is supposed to happen. But when I type into TextMate :

p { color: blue; }

Then save it to my desktop, type into Terminal on my iMac; sass test.scss the block cursor just moves to the next command line and nothing else.

I hate Sass...

Can anyone offer any suggestions here please?

Thanks.

Chris Dziewa
Chris Dziewa
17,781 Points

In the current directory you are in, type ls. If the test.scss file is not in there, then you are in the wrong directory.