問題
bundle update
を実行した際に、ffi のインストール(アップデート)に失敗した
$ bundle update
# ...(略)
Fetching ffi 1.12.2 (was 1.10.0)
Installing ffi 1.12.2 (was 1.10.0) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
# ...(略)
extconf failed, exit code 1
Gem files will remain installed in /Users/xxxxx/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/ffi-1.12.2 for inspection.
Results logged to /Users/xxxxx/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0-static/ffi-1.12.2/gem_make.out
An error occurred while installing ffi (1.12.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.12.2' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
middleman was resolved to 4.3.6, which depends on
middleman-core was resolved to 4.3.6, which depends on
listen was resolved to 3.0.8, which depends on
rb-inotify was resolved to 0.10.1, which depends on
ffi
試したこと
ffi をバージョン指定でインストール(アップデート)しようとしても失敗した
$ gem install ffi -v '1.12.2'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
# ...(略)
解決方法
Xcode Command Line Tool をインストールした上で、ffi をインストール(アップデート)したら成功した
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
$ gem install ffi -v '1.12.2'
Building native extensions. This could take a while...
Successfully installed ffi-1.12.2
Parsing documentation for ffi-1.12.2
Installing ri documentation for ffi-1.12.2
Done installing documentation for ffi after 41 seconds
1 gem installed