質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Sass

Sassは、プログラミング風のコードでCSSを生成できるスタイルシート言語です。 scss ファイルを、変換(コンパイル)してCSSファイルを作成します。

Q&A

解決済

1回答

1159閲覧

Sassのインストールについて

shabao

総合スコア3

Sass

Sassは、プログラミング風のコードでCSSを生成できるスタイルシート言語です。 scss ファイルを、変換(コンパイル)してCSSファイルを作成します。

0グッド

0クリップ

投稿2022/01/07 13:44

お忙しいところ申し訳ありません。
shabaoと申します。

自分は現在Sassを使えるようになりたいと思い、SassをWindowsインストールしようとしているのですがうまくいきません。
Rubyはコマンドプロンプトで確認した限りインストールできたいるのですが、その次のSassをインストールする段階で

C:\Users\■■■■■>gem install sass
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.

current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ffi-1.15.4/ext/ffi_c

C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0 -r ./siteconf20220107-4076-n22o8u.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby31-x64/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-system-libffi
--disable-system-libffi
--with-libffi-dir
--without-libffi-dir
--with-libffi-include
--without-libffi-include=${libffi-dir}/include
--with-libffi-lib
--without-libffi-lib=${libffi-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
--with-ffi-dir
--without-ffi-dir
--with-ffi-include
--without-ffi-include=${ffi-dir}/include
--with-ffi-lib
--without-ffi-lib=${ffi-dir}/lib
C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:498:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:624:in block in try_compile'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:573:in with_werror' from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:624:in try_compile'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1160:in block in have_header' from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1007:in block in checking_for'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:362:in block (2 levels) in postpone' from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:332:in open'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:362:in block in postpone' from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:332:in open'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:358:in postpone' from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1006:in checking_for'
from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1159:in have_header' from extconf.rb:10:in system_libffi_usable?'
from extconf.rb:42:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/ffi-1.15.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ffi-1.15.4 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/ffi-1.15.4/gem_make.out

このようなコードが表示されてしまい、インストールできません。
グーグルで調べていても何が原因なのかもわからない状態です。
詳しい方に是非教えていただきたいです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

maisumakun

2022/01/07 14:49

どのような理由で、「Rubyから」入れようとしていますか?
shabao

2022/01/07 14:57

WEBサイトのコーディングをするのに便利だと聞いて調べてみるとrubyからの方法が載っていたのでそちらを参考にしました。
guest

回答1

0

ベストアンサー

Rubyで使えるsassは、Rubyネイティブで書かれたものは開発中止、libsass経由のものも廃止予定となっています。現在開発の続くsassは、dart-sassというものです。

投稿2022/01/07 22:51

編集2022/01/07 23:02
maisumakun

総合スコア145184

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

shabao

2022/01/11 06:09

ありがとうございます!! おかげでインストールすることができでき、sassを使うことができました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問