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 help!

I recently started the sass course and on the second video i am already stuck :/ I am trying to run the

sass --watch .

command in the terminal. I get a weird error every time though.

LoadError: no such file to load -- rb-fsevent Use --trace for backtrace.

I have already tried putting all my files in different directories, using the different syntax it suggests when just putting sass --watch, and even tried sass --trace but i had no idea what that was. I was just wondering if anyone could tell me if i am doing anything wrong.

Hi Alex, was having same problems. I knew my directories and files need to be in sync. Where my test.scss file was located was where i needed to start on my command prompt when running sass. At the command prompt within the directory c:/user/desktop: sass test.scss my file should be located at C:user/desktop/test.scss. If file and command prompt: at different locations, then it can not find file to load. or I would need to give full path if just in user directory at the command prompt. Such as, c:/user sass desktop/test.scss if Im already at c:/user/desktop i would only need to run test.scss because my file is located at the desktop directory. In your command prompt, go to the folder webdesign/sass and then run it again. I didnt see you start correctly at the command prompt. If your file is in the Sass folder you need to go to that directory in the command prompt also.
There is a reason sass can not find the file to load...need to figure out why the command prompt and file test.scss is not talking to each other.

I hope this helps or resolves your issue.

8 Answers

Chris Dziewa
Chris Dziewa
17,781 Points

Have you changed to the correct directory in the terminal before running the watch command?

yeah, i have the file test.scss in the sass directory and I am running the watch command while in that sass directory

Chris Dziewa
Chris Dziewa
17,781 Points

Did you type the name of the file after watch? sass --watch test.scss You can also watch an entire folder if you are one directory above your folder. Then you can call watch on your folder. Also, make sure that your file is actually showing up in the directory by typing ls.

https://www.youtube.com/watch?v=wLNr6DfF_YE&feature=youtu.be

I took a screen capture of my exact steps. If you could review it and tell me if you see any errors that would be greatly appreciated. As you can see though, it works each time I run the command but not automatically as desired.

Chris Dziewa
Chris Dziewa
17,781 Points

I'm pretty sure you are doing this so forgive me if you are but are you saving after the changes you make?

EDIT: the video was cutting off the bottom of your sublime text editor.

Chris Dziewa
Chris Dziewa
17,781 Points

Which version of Ruby are you using?

Yeah I am saving after I do it and I am using ruby 1.8.7

Chris Dziewa
Chris Dziewa
17,781 Points

Maybe you could try to see if updating to ruby 2 fixes this? I have no problem with mine and that is what I am running also on Mac.

I'll give it a try. Hopefully this works!

Chris Dziewa
Chris Dziewa
17,781 Points

Wish I could be of more help, but from what I saw, you are doing all of the right commands and you are choosing the correct directory so maybe there is a problem with the Sass listener used for the watch command.

Yeah seems like it because I upgraded my Ruby but it still doesn't work...

Chris Dziewa
Chris Dziewa
17,781 Points

You could try reinstalling the latest version of Sass too. It may just be some configuration issue.

also, make sure you have a space from the word watch the (dot) . (command for this directory). such as, sass --watch .

in terminal put

"sudo gem install rb-fsevent"

then try sass --watch . after its installed the gem. it should work

Regards

The gem installed correctly, still getting the error.