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 CSS to Sass Installing Sass and Setting up the Project Bringing our Sass Project into Workspaces

Errno::EACCES: Permission denied @ rb_sysopen - css/style.css

I'm having trouble getting the sass --watch scss:css to work on my computer. Can anyone help me? Here's what I get when I do the sass --watch scss:css command:

PS C:\Users\username\lake-tahoe> sass --watch scss:css
>>> Sass is watching for changes. Press Ctrl-C to stop.
Errno::EACCES: Permission denied @ rb_sysopen - css/style.css
  Use --trace for backtrace.

Here's what I get when I run a --trace:

PS C:\Users\username\lake-tahoe> sass --watch scss:css --trace
>>> Sass is watching for changes. Press Ctrl-C to stop.
C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:512:in `initialize': Permission denied @ rb_sysopen - css/style.css (Errno::EACCES)
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:512:in `open'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:512:in `write_file'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:501:in `update_stylesheet'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:209:in `each'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin/compiler.rb:293:in `watch'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/plugin.rb:108:in `method_missing'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/exec/sass_scss.rb:381:in `watch_or_update'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/exec/sass_scss.rb:51:in `process_result'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/exec/base.rb:52:in `parse'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/lib/sass/exec/base.rb:19:in `parse!'
        from C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-4.0.0.alpha.1/bin/sass:13:in `<top (required)>'
        from C:/Ruby24/bin/sass:23:in `load'
        from C:/Ruby24/bin/sass:23:in `<main>'
Andrew Hale
Andrew Hale
10,925 Points

I'm not sure what your file structure looks like, so can't answer on specifics. For instance, if your sass and css files are in different directories.

But you need to specify the file name to watch for.

Your code should look like:

sass --watch style.scss:style.css

Alright, I figured it out. I had the project folder on my desktop. I ended up just putting it flat out in C:\ and everything seems to be working now. /shrug. Thanks though!