本文介绍了SublimeLinter SCSS-Lint不掉毛吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SublimeLiner调试设置为开的情况下,我在控制台中看到了这一点,使其看起来像是在加载linter:

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实际上在该目录中.

scss-lint is in fact in that directory.

但是我在编辑.scss文件时看到了这一点:

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.

提供任何线索吗?

推荐答案

Scss-Lint的当前版本不支持RVM,您可以在 https://github.com/attenzione/SublimeLinter-scss上获得更多信息. -lint/issues/5

Current version of Scss-Lint doesn't support RVM,You can get more information at https://github.com/attenzione/SublimeLinter-scss-lint/issues/5

有几种解决方法

  • 从终端用subl启动Sublime Text 3(这实际上对我有用).
  • 使用rvm @global do gem install scss-lint将scss-lint gem安装到@global gemset中,然后正常启动Sublime Text 3.请记住,这有点遗漏了整个RVM点(我自己也没有验证).
  • 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).

这篇关于SublimeLinter SCSS-Lint不掉毛吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 14:52