podコマンドがエラーに bad interpreter: No such file or directory : CocoaPods


ライブラリを更新しようとしたらエラーになったので cocoapodsを入れ直し?
mac os更新の影響でしょうか

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

$ sudo gem install cocoapods
Done installing documentation for thread_safe, tzinfo, concurrent-ruby, i18n, activesupport, nap, fuzzy_match, httpclient, algoliasearch, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, netrc, cocoapods-trunk, cocoapods-try, molinillo, atomos, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 17 seconds
29 gems installed
$ pod update
Update all pods
Updating local specs repositories

Installing FBSDKCoreKit 5.13.1 (was 5.0.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Installing FBSDKLoginKit 5.13.0 (was 5.0.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Installing GoogleToolboxForMac 2.2.2 (was 2.2.1)
Installing SQLite.swift 0.11.5
Installing nanopb 0.3.9011 (was 0.3.901 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Generating Pods project
Integrating client project
Pod installation complete! There are 7 dependencies from the Podfile and 12 total pods installed.


メモ : podsを更新したら、xcode – clean build folderしないと前のものが残っている。