4
1

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.

bundle installでAn error occurred while installing ffi (1.9.25), and Bundler cannot continue.というエラーになったときのメモ

Last updated at Posted at 2020-11-25

メモなので詳しいことは省きます><


bundle installしたら↓のエラーで成功しません。
( < ffi 1.9.25 >の部分は他のgem(例えば、okogiri (1.10.9))だったりもします。)

・・・省略・・・

Installing <ffi 1.9.25> with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

・・・省略・・・

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

・・・省略・・・

解決策

エラー文のGem::Ext::BuildError: ERROR: Failed to build gem native extension.がヒントになりました。
↓のコマンドを上から順に実施し、その後改めてbundle install、成功!

$ sudo rm -rf $(xcode-select -print-path)
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
4
1
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
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?