0
0

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 3 years have passed since last update.

CatalinaにアップデートしたらSassが使えなくなった

Last updated at Posted at 2020-02-05

#意気揚々とCatalinaにアップデート
最近iPad proを買ったので、AirPlayでワイヤレスで簡単にマルチディスプレイができると噂のsidecarを導入しようと意気揚々とCatalinaにアップデートした。
mojaveにアップデートした時も、なんだかんだ開発環境でエラーが出まくったことがあり億劫になっていたが、iPad proを購入したテンションでアップデートしてしまった。

#sassコマンドでエラーが出る
さて、sassコマンドを打つと

bash: /usr/local/bin/sass: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory

まあ、なんとなく予想はしてました。はい。
とりあえず、sassを入れ直そうと。

sudo gem install -n /usr/local/bin sass

上記のコマンドを打つと

Fetching sass-listen-4.0.0.gem
Fetching ffi-1.12.2.gem
Fetching rb-fsevent-0.10.3.gem
Fetching sass-3.7.4.gem
Fetching rb-inotify-0.10.1.gem
Building native extensions. This could take a while...
ERROR:  Error installing sass:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200205-29332-2q35bl.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.12.2/gem_make.out

ハイハイ。なるほどね。わからん。

、、、ん?

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

なんかruby developmentの環境が無い的なとこを言っておるな。

ということで、Xcodeを入れたら解決するかなと思って、AppStoreへ。
インストールっと。。。

.
.
.
.
.
.
.
.
.
.

全然終わらん。

ハイハイ。なるほどねと。私もそこまで暇じゃ無いですよと。
そこで、More Software Downloads - Apple Developerなるものを発見。
そから、Command Line Tools for Xcode を検索してインストール。

インストーラーに従って進めていって無事インストール完了!
もう一度、sassをインストール

sudo gem install -n /usr/local/bin sass
Building native extensions. This could take a while...
Successfully installed ffi-1.12.2
Successfully installed rb-inotify-0.10.1
Successfully installed rb-fsevent-0.10.3
Successfully installed sass-listen-4.0.0

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

Successfully installed sass-3.7.4
Parsing documentation for ffi-1.12.2
Installing ri documentation for ffi-1.12.2
Parsing documentation for rb-inotify-0.10.1
Installing ri documentation for rb-inotify-0.10.1
Parsing documentation for rb-fsevent-0.10.3
Installing ri documentation for rb-fsevent-0.10.3
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.7.4
Installing ri documentation for sass-3.7.4
Done installing documentation for ffi, rb-inotify, rb-fsevent, sass-listen, sass after 31 seconds
5 gems installed

Successfullyって出てる!!!!TOEIC135点の僕でもわかる。成功。

ってことで、もう一度sassコマンドを打つと無事に動きました!

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?