SublimeLinter SCSS-Lint Not Linting?

孤者浪人 提交于 2019-12-11 11:36:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!