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)
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/plugin.rb:107:inmethod_missing'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:452:in watch_or_update'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:315:inprocess_result'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:41:in parse'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/lib/sass/exec.rb:21:inparse!'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/gems/sass-3.2.8/bin/sass:9:in <top (required)>'
from /home/javier/.rvm/gems/ruby-2.0.0-p0/bin/sass:23:inload'
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.
Related
Jekyll used to work on my computer. But after I tried to install octopress, it doesn't work any more.
I do not know where is the problem but when I try anything else on terminal, it gives this output.
seniorokur#dell-Inspiron-5521:~/Masaüstü$ jekyll new sds
/usr/lib/ruby/vendor_ruby/jekyll/tags/highlight.rb:11: warning: already initialized constant Jekyll::Tags::HighlightBlock::SYNTAX
/var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/tags/highlight.rb:11: warning: previous definition of SYNTAX was here
/usr/lib/ruby/vendor_ruby/jekyll/tags/include.rb:16: warning: already initialized constant Jekyll::Tags::IncludeTag::VALID_SYNTAX
/var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/tags/include.rb:18: warning: previous definition of VALID_SYNTAX was here
/usr/lib/ruby/vendor_ruby/jekyll/tags/include.rb:17: warning: already initialized constant Jekyll::Tags::IncludeTag::VARIABLE_SYNTAX
/var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/tags/include.rb:19: warning: previous definition of VARIABLE_SYNTAX was here
/usr/lib/ruby/vendor_ruby/jekyll/tags/post_url.rb:4: warning: already initialized constant Jekyll::Tags::PostComparer::MATCHER
/var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/tags/post_url.rb:4: warning: previous definition of MATCHER was here
/var/lib/gems/2.1.0/gems/jekyll-2.5.3/bin/jekyll:16:in `<top (required)>': undefined method `require_from_bundler' for Jekyll::PluginManager:Class (NoMethodError)
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
I couldn't search something for solving the problem because I do not know what is the problem. What should I do?
It seems like you have installed jekyll via packagemanager and also via gem
uninstall the packagemanager version with
sudo apt-get remove --purge jekyll
and install the gem again:
sudo gem install jekyll jekyll-watch
It seems that you have a collision somewhere
Try a :
gem cleanup jekyll
gem update
Edit:
You have one jekyll in /usr/lib/ruby/vendor_ruby/jekyll/ and one in /var/lib/gems/2.1.0/gems/jekyll-2.5.3/ I think the first one needs to be removed.
I am a newb to the command line. The furthest I have taken it was to install the sass version of Foundation successfully. I want to try out Susy to see if it suites my needs better. I was following the 11 videos series on Susy Tutorials on Level Up Tuts by Scott Tolinski. I followed him step by step during the installation process all the way up until the "compass watch" command within my root folder. I was then thrown this error:
NoMethodError on line ["31"] of /Users/bradgabel/.rvm/gems/ruby-2.0.0-p247/gems/compass-1.0.0.rc.0/lib/compass/sass_compiler.rb: undefined method `on_compilation_starting' for #Sass::Plugin::Compiler:0x007fe4a41def80>
Run with --trace to see the full backtrace
The gems I have installed are:
compass (1.0.0.rc.0, 0.12.7)
compass-core (1.0.0.rc.0)
compass-import-once (1.0.4)
sass (3.4.0.rc.2, 3.2.19)
susy (2.1.3)
Try to put this on your sass file.
#import "susyone";
hope can solve your problem.
I am also having issues using compass watch from the command line but mine was after I updated my susy / sass gems. I have found that using preros was much easier and you can configure it to use the same config.rb file + your system ruby gems without having to navigate the command line. Best of luck.
I am trying to learn sass so I can develop my front end skills a little bit more because that is what I hope to be some day. The only thing is I can't get sass to work.
Whenever I run the sass --watch . command it returns this error.
>>> Sass is watching for changes. Press Ctrl-C to stop.
write ./test.css
LoadError: no such file to load -- rb-fsevent
Use --trace for backtrace.
I did a bit of research on this error and it was suggested on this site to just simply install the rb-fsevent file that is missing so I ran the gem install rb-fsevent command and then got this error.
Fetching: rb-fsevent-0.9.4.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
so I did a bit of research on THIS error and it was suggested agin on this site to just run the install with sudo. So i did just that I didn't get an error so i was quite excited because I have been fighting with this for a while so i want back to the start of this question and ran the --watch command and got the same exact error. Can anyone help me fix this?
Your first error is because Ruby can't load the rb-fsevent gem. This could be because the gem is not installed. Trying to install the gem was a good idea.
Your second error is because you are trying to install the gem to a directory that you do not have permissions for. Using sudo to do the install is an acceptable solution. You can also do gem install --user-install to install to your home directory.
You are still getting the first error because even though the gem is installed, Ruby cannot load it. This could be because sudo installed the gem with the wrong permissions, or installed it to the wrong location, or Ruby is looking for it in the wrong location.
Thus your solution would be to
Locate the gem files you installed
Check that their permissions allow you to read them
Check ruby -e 'p $LOAD_PATH' to see if Ruby is looking in the right place for the gem
I am having problems when creating a new compass project (Windows 7). I get this:
C:\>compass create a
create config.rb
Errno::EACCES on line ["891"] of C: Permission denied - (C:/a/config.rb20140321-6828-1g0ytlc, C:/a/config.rb)
Run with --trace to see the full backtrace
I have tried to start cmd with "Run as administrator", I have tried to delete compass, sass and ruby, and reinstalled without any luck. Anyone else having problems or know a solution to this irritating problem?
I was using the latest version (21.03.2014) of compass v.0.12.4...
Downgraded to v.0.12.2 everything worked fine!
Looks like a bug?
To downgrade:
$ gem uninstall compass
$ gem uninstall sass
$ gem install compass -v 0.12.2
$ gem install sass -v <rev>
Please update to Sass 3.2.18 and let me know if that fixes it.
Is this linked to
Compass/Sass writing files with "No Access" permissions for Everyone group on OSX?
If so, updating to 3.2.18 hasn't made a difference.
This has been resolved in Compass version 0.12.5
https://github.com/chriseppstein/compass/issues/1618
I'm attempting to build local Ruby documentation as suggested here:
https://github.com/toy/doc
However when I use the default Rakefile I get the following:
[Documentation]$ rake build
configuring and updating: 100.0%
rake aborted!
undefined method `available?' for Gem:Module
/Users/snowcrash/.rvm/gems/ruby-2.0.0-p195/gems/sdoc-0.2.20/lib/sdoc/json_backend.rb:9:in `<top (required)>'
Any suggestions?
I don't know much about ruby (and even less about the gem ecosystem built up around it), but I believe a possible workaround for this issue is to find what gems the project requires and manually install them. In the case of this particular project, it looks like you need the gem "fspath".
At the project root, type
gem install fspath
and try re-running rake.
I honestly don't know the actual root cause of the issue, other than that presumably, your version of the 'gem' program is probably > v2, while some other program (rake?) expects it to be older and still support the "available?" method.
If installing "fspath" doesn't fix the issue, you could try downgrading your version of gem by doing
gem install -v [some version of gem older than v2]
Check gem install --help for more info on this.
This is just for future visitor who has the same issue.
As ekremkaraca said, you can just solve this by downgrading rubygems.
rvm install --force rubygems 1.4.2