cmder で「make failedNo such file or directory」を修正する方法
概要
現在、Windows 10でRubyとrailsに取り組んでおり、cmderにsolargraphやrubocopなどのgemをインストールしようとしましたが、機能しません。 「作成に失敗しました。そのようなファイルまたはディレクトリはありません」と表示されます
ccmderが言うには
ERROR: Error installing solargraph:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.3/ext/jaro_winkler
C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0 -r ./siteconf20190917-20996-6o1pbx.rb extconf.rb
creating Makefile
current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR=" clean
current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="
Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.3 for inspection.
Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/jaro_winkler-1.5.3/gem_make.out
なぜこれが起こったのかわかりません…他の宝石をインストールすると同じエラーが発生します。
解決策
今日ちょうどこの問題に遭遇しました。重要な行は、make failedNo such file or directory - make です。これは、インストーラーがプログラム make を使用しようとしているが、インストールされていないことを示します。私はubuntuを使用しているので、sudo apt install makeを実行しただけで問題は解決しました。その後、makeがインストールされ、問題なく使用できました。 Windows については、「Windows で “make” をインストールして使用する方法」を参照してください。