LoginSignup
0
0

More than 1 year has passed since last update.

bundle installしたらエラーが発生した!

Posted at

問題

bundle installをしたら、下記のエラーが発生した

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

/Users/◯◯/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-21/2.6.0/racc-1.6.2/mkmf.log

extconf failed, exit code 1

(中略)

An error occurred while installing racc (1.5.2), and Bundler cannot continue.
Make sure that `gem install racc -v '1.6.2' --source 'https://rubygems.org/'` succeeds before bundling.

調べたこと

mkmf.logを見ろって書いてあるのでログを見てみたところ、下記のエラーがありました。

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

google先生に助けてもらったところ、
どうやらOSアプデのせいでXcode Command Line Toolが消えてしまったらしい。

対処方法

Xcode Command Line Tool のインストールをする

xcode-select --install

無事にbundle installが通って解決!

最後に

最初はmkmf.logの場所にうまく辿れなくてネットを彷徨っていたのですが、
vscodeで該当のパスをクリックしたらあっけなくログを開いてくれて拍子抜け・・・
でもそこからはサクッと解決に至れたので良かった!
OSアプデの度にこの事象が発生するようなので、次回からはもう大丈夫!

参考サイト

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