The following error occurs when using pod install
$ sudo gem install cocoapods -n/usr/local/bin
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
This is caused by the Mac upgrade system. When your Mac system is upgraded to high siera, don't forget to update cocoapods.
Excuting an order:
$ sudo gem install cocoapods -n/usr/local/bin