Reputation: 965
I am attempting to run a sass watch command on a new branch of code. when I run the normal command I get a permissions denied error.
Errno::EACCES: Permission denied - /me/atg/workspace/AA/dev_3.4.0
Here's my command:
sass --watch stores.scss:/me/atg/workspace/AA/dev_3.4.0/a_a/modules/estore/j2ee/AA.war/static/css/stores.css --style compressed
I ran the command using sudo, and it does seem to run. The watch picks up that changes have been made in the scss files, but the changes do not appear after refresh as they did previously using the watch command. I have to rebuild and start the server for the changes to actually show on my local site.
I think it is possibly a cache issue, but not sure. I am not using compass and most of the solutions I've read about seem to be related to compass.
Below is the trace when running the watch command without using sudo.
from /usr/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /usr/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin/compiler.rb:478:in `update_stylesheet'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin/compiler.rb:209:in `each'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin/compiler.rb:293:in `watch'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/plugin.rb:108:in `method_missing'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/exec/sass_scss.rb:384:in `watch_or_update'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/exec/sass_scss.rb:51:in `process_result'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/exec/base.rb:52:in `parse'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/lib/sass/exec/base.rb:19:in `parse!'
from /var/lib/gems/1.9.1/gems/sass-3.4.16/bin/sass:13:in `<top (required)>'
from /usr/local/bin/sass:23:in `load'
from /usr/local/bin/sass:23:in `<main>'
Upvotes: 2
Views: 2238
Reputation: 123
For read-speed, Sass caches parsed documents for reuse, only parsing documents again when changed. By default, Sass writes these cached files to :cache_location
. When you start having sudden Sass compile issues, a common culprit is your .sass-cache
. Maybe you upgraded your IDE, made some directory structure changes, or sometimes an OS update (OSX is notorious for permissions headaches). Whatever the case may be, if Sass can't access the .sass-cache
or something has gotten out of sync, things can get rather hairy with a quickness.
Assuming from your description that you're merely running sass watch
from the command line and not using some IDE compilation tool, a good place to start looking for your .sass-cache
is ./tmp/sass-cache
or ./.sass-cache
of your project, as detailed here. Keep in mind that the file is usually hidden by default. You can try manually deleting the folder and then running your sass watch
command again. If all goes well, your .sass-cache
should completely rebuild the next time you run sass watch
, and you should be up and running again.
If, by chance, you've upgraded your OS recently and you're running OSX, there does seem to be an issue with Sass post-upgrade that sounds like what you are describing as well. A fix suggested in the comments that seems to solve the problem for everybody is to run sudo gem install -n /usr/local/bin sass
.
Hope this helps!
Upvotes: 1