Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Sass overwrite problem

This is what I get when I type in sass --watch . : Tylers-Mac-mini:~ tylerhaas$ sass --watch .

Sass is watching for changes. Press Ctrl-C to stop. write ./test.css LoadError: cannot load such file -- rb-fsevent Use --trace for backtrace. Tylers-Mac-mini:~ tylerhaas$

This makes it so that the css file doesn't update with my code. help please!

9 Answers

Magnus Hovland
Magnus Hovland
5,657 Points

If I understand correctly it seems that it is trying to require "rb-fsevent". I'm not sure if this will help, but try running

gem install rb-fsevent

And then run the sass watch command again when the gem has finished installing. Hopefully that will take care of it. :)

-M

Laura Cressman
Laura Cressman
12,548 Points

Hi Magnus, I'm having this issue as well, but for some reason this fix doesn't work for me. Any other suggestions? Thanks, Laura

Magnus Hovland
Magnus Hovland
5,657 Points

Hi Laura, Do you get the same error when running sass --watch . after installing rb-fsevent as you did before installing it? Did rb-fsevent install correctly? Copy & paste your error here in case it's a little different from the one Tyler got. :)

-M

Laura Cressman
Laura Cressman
12,548 Points

Thanks Magnus-here's what I got :)

lauracrsmansmbp:~ lauracressman$ sudo gem install rb-fsevent Successfully installed rb-fsevent-0.9.4 Parsing documentation for rb-fsevent-0.9.4 1 gem installed lauracrsmansmbp:~ lauracressman$ cd Documents lauracrsmansmbp:Documents lauracressman$ sass test.scss p { color: blue; width: 40px; height: 10px; font-size: 1.2em; } lauracrsmansmbp:Documents lauracressman$ sass --watch .

Sass is watching for changes. Press Ctrl-C to stop. [Listen warning]: Listen will be polling for changes. Learn more at https://github.com/guard/listen#polling-fallback. Change detected to: test.scss write ./test.css

I don't get overwrite, which I think is the issue.

Chris Scott
Chris Scott
7,673 Points

could be a permissions error have you tried

"sudo sass --watch"

yes I should clarify that instead of overwrite ./test.css it says write ./test.css so I can update the css file with my code it just wont do it automatically

that worked thank you so much!

Thanks, Magnus - I ran into this as well, and your fix took care of this!

Y K
Y K
3,390 Points

So when I tried gem install rb-fsevent command, I got following.

Yamatos-MacBook-Air:Desktop yamatokaneko$ gem install rb-fsevent ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. Yamatos-MacBook-Air:Desktop yamatokaneko$

Anybody knows how to solve this and install it correctly?

I think I had to precede some of my install commands with sudo, and then enter my password.

Hey! Same thing here. I get the "You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory" message when trying to install rb-fsevent. Any news on this front?