LoginSignup
45
19

More than 3 years have passed since last update.

MacのOSバージョンアップしたらbundle exec pod installできなくなったよ😿

Last updated at Posted at 2017-12-22

image.png

OSアップデートしたら何かある

重い腰を上げてHigh SierraにOSをアップデートしました。
弊社podのバージョンを指定してまして

$ bundle exec pod install

で、いつも操作するんですが、
high sierraにしてからエラーになるように。。

$ bundle exec pod install
-bash: /usr/local/bin/bundle: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

2020/12/29追記
Big Surにした時はこんなエラーが出る

Could not find rake-12.3.3 in any of the sources

😩😩😩

しょーがない

とりまgoogる
System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directoryで、検索🔍

macOS High Sierraでcocoapodsが使えなかった話(解決) - Qiita

がHIT🔫🔫

GitHubに該当記事があった(公開からだいぶ経ってGitHubであるべき表示がStackOverFlowになってるのに気づいた)

別記事によれば、前にrubyバージョンが上がったのはMavericks以来で実に4年ぶりだそうな

ということで、

sudo gem update --system -n /usr/local/bin

でもろもろアップデート
gemで入れたpodsもとりあえず入れなおしておく

sudo gem install cocoapods -n /usr/local/bin

普通にpod使ってる人はこれで解消するはず

さらに自環境だとbundlerの入れ直しが必要だったので

sudo gem install bundler -n /usr/local/bin

を実行して、プロジェクトファイル下のgemfileあるところで

bundle install

※ Catalina以降はpath指定は非推奨になったので削除しました。(2020/12/29更新)

を実行して、gemfileに記載されてるcocoapods他もろもろインストール

やっとこbundle exec pod installができるように🎉🎉

45
19
1

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
45
19