10
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

scss-lintのgem名が変わっていてハマった話

Last updated at Posted at 2017-09-08

要約

gemの名前が変わってるよ、ということ。
scss-lintではなくscss_lint
ハイフンがアンダースコアに変わっているのでgem updateとかgem installするときは注意しましょう。
紛らわしいんじゃファッ◯!!

事の顛末

「そう言えばAtomのpackage更新してなかったなぁ」と思ってまとめて更新かけたらlinter-scss-lintがエラー吐くように…
スクリーンショット 2017-09-08 18.32.23.png

あーはいはいgem udpateも必要だよねー

$ gem list
︙
scss-lint (0.38.0)
︙

$ gem update scss-lint
Fetching: scss-lint-0.38.0.gem (100%)
WARNING: `scss-lint` has been renamed to `scss_lint` to follow proper RubyGems naming conventions. Update your Gemfile or relevant install scripts to install `scss_lint`.
Successfully installed scss-lint-0.38.0
Parsing documentation for scss-lint-0.38.0
Installing ri documentation for scss-lint-0.38.0
Done installing documentation for scss-lint after 1 seconds
1 gem installed

だがエラーが消えない!!!
なんでや!!!!

Atomのsetting=>packages=``linter-scss-lintで説明を見るとv0.43.2以上でないと動かないらしい
スクリーンショット 2017-09-08 18.40.39.png

しかしgem uninstall=>gem installやっても入れ直してもversionは0.38.0

$ gem uninstall scss-lint
Remove executables:
	scss-lint

in addition to the gem? [Yn]  y
Removing scss-lint
Successfully uninstalled scss-lint-0.38.0

$ gem install scss-lint
Fetching: scss-lint-0.38.0.gem (100%)
WARNING: `scss-lint` has been renamed to `scss_lint` to follow proper RubyGems naming conventions. Update your Gemfile or relevant install scripts to install `scss_lint`.
Successfully installed scss-lint-0.38.0
Parsing documentation for scss-lint-0.38.0
Installing ri documentation for scss-lint-0.38.0
Done installing documentation for scss-lint after 1 seconds
1 gem installed

Atom側のlinter-scss-lintをuninstall=installしても変わらず。
なんでだああああああ、ということでエラーメッセージでググったらドンピシャのissueが
Old version off scss-lint error message · Issue #160 · AtomLinter/linter-scss-lint · GitHub

スクリーンショット 2017-09-08 18.49.51.png

scss-lintを消してscss_lintを入れたら動いたよ」とのこと。

$ gem uninstall scss-lint

$ gem install scss_lint
Fetching: scss_lint-0.54.0.gem (100%)
Successfully installed scss_lint-0.54.0
Parsing documentation for scss_lint-0.54.0
Installing ri documentation for scss_lint-0.54.0
Done installing documentation for scss_lint after 1 seconds
1 gem installed

はいったああああああああああああ!!!
はい、linter-scss-lintが吐いてたAtomのエラーも消えました。
ということで、gemの名前が変わってたんですねぇ。(issueの上がった日を見るに2016年5月12日近辺で変更があったんですかね。)

確かにlinter-scss-lintのInstallationにもgem install scss_lintって書いてある。。。
にしても紛らわしすぎだろ!!!!

参考

GitHub - brigade/scss-lint: Configurable tool for writing clean and consistent SCSS

10
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?