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 trialAlex Cawley
9,291 Pointssass Errors in the console
I have been trying to learn sass but I have been getting some errors that are preventing me from learning on the very first stage. I have tried researching and finding answers but nothing has been working. Basically when i run the watch command I get this error
>>> Sass is watching for changes. Press Ctrl-C to stop.
LoadError: no such file to load -- rb-fsevent
Use --trace for backtrace.
So I figured I just didnt have the rb-fsevent file so I ran the command
gem install rb-fsevent
and got another error
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
I have no idea how I would fix this one so Im just looking for some advice on how to fix this. thanks!
3 Answers
Chris Shaw
26,676 PointsHi Alex,
Generally on OS X you need to run gem commands as sudo
as Ruby stores the cache folders under a different permission set to your user.
Chris Shaw
26,676 PointsTry running watch as sudo
too, some gems require extra permission to access files which I've seen on my Macbook.
Alex Cawley
9,291 PointsThat still returns the error. Is there anyway that I can change the permissions for the folder with the gems in the second error?
Chris Shaw
26,676 PointsWhat is the command you're running?
Alex Cawley
9,291 PointsI'm not sure which one you want so here are two. For the sudo one you just recommended I did
sudo sass --watch .
and for the one giving me the error for permissions I'm running
gem install rb-fsevent
Chris Shaw
26,676 PointsThe sass --watch
command requires an input file and an output file, for example.
sass --watch input.scss:output.css
Alex Cawley
9,291 PointsIt still gives me the rb-fsevent error, with and without the sudo
Alex Cawley
9,291 Pointshttps://www.youtube.com/watch?v=wLNr6DfF_YE
Here is a quick video I made a while ago when I first tried to figure out the problem. This is a little older so I am still doing the same thing as I am in the video except I now have Mavericks and I add the sudo to the command. Do you see anything wrong?
Alex Cawley
9,291 PointsAlex Cawley
9,291 PointsI just tried this and it says the the gem is installed successfully but then I reran the watch command and I am still getting the error.