When i execute the line
$sass --watch sass/views.scss:views.css
i get the following message
Sass is watching for changes. Press Ctrl-C to stop. NameError: uninitialized constant Listen::MultiListener Use --trace for backtrace.
As you can say the process stops immediately and the watch option doesn't work.
What's the problem here ?? I have installed the Ruby 2.0.0-p0 version.
Any help appreciated.
EDIT: (--trace)
Sass is watching for changes. Press Ctrl-C to stop. /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/plugin/compiler.rb:266:in
watch': uninitialized constant Listen::MultiListener (NameError)
method_missing'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/plugin.rb:107:in
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:452:inwatch_or_update'
process_result'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:315:in
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:41:inparse'
parse!'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:21:in
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/bin/sass:9:in<top (required)>'
load'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/bin/sass:23:in
from /home/javier/.rvm/gems/ruby-2.0.0-p0/bin/sass:23:in `'
I tried these answers and none worked, so i did some more research. Apparently, the problem is with the listen
gem that SASS is using. Sass is only compatible with listen 0.7.
I was able to get it working by running the following two commands (as root):
gem uninstall listen
gem install listen -v 0.7.3
I had the same issue. You just need to run the command in sudo mode.
sudo sass --watch sass/views.scss:views.css
I fixed it by uninstalling the original sass I had installed using apt-get (ruby-sass) and reinstalled using gem
Well i fix my problem updating the sass gem to the latest version (3.2.9). I think that this update provide better compatibility with Ruby 2.0.0 when using he --watch parameter. Everything works great now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With