问题
With SublimeLiner debug set to on, I see this in the console that makes it appear the linter is loaded:
SublimeLinter: scss activated: /Users/bob/.rvm/gems/ruby-2.0.0-p247@rails3/bin/scss-lint
scss-lint is in fact in that directory.
But I see this when a .scss file is edited:
SublimeLinter: scss: _layout.scss ['/Users/bob/.rvm/gems/ruby-2.0.0-p247@rails3/bin/scss-lint']
SublimeLinter: scss output:
/Users/bob/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'scss-lint' (>= 0) among 0 total gem(s) (Gem::LoadError)
from /Users/bob/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/bob/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/bob/.rvm/gems/ruby-2.0.0-p247@rails3/bin/scss-lint:22:in `<main>'
No syntax errors are highlighted.
Does that provide any clues?
回答1:
Current version of Scss-Lint doesn't support RVM, You can get more information at https://github.com/attenzione/SublimeLinter-scss-lint/issues/5
There are several workarounds
- Start Sublime Text 3 from the Terminal with subl (This actually works for me).
- Install the scss-lint gem into the @global gemset with
rvm @global do gem install scss-lint
and start Sublime Text 3 normally. Bear in mind this kinda misses the the whole RVM point (Didn't verify it myself).
来源:https://stackoverflow.com/questions/24140947/sublimelinter-scss-lint-not-linting