I updated my macOS to High Sierra, Now installing dependencies through cocoapods in my iOS application. But I face the following error.
XXXXXXXXX:MyProject CompanyName$ pod update
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
Zubair-mac-mini:~ sdsol$ gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
Finally I found a solution after a lot of search.
1: Update your terminal to the latest version.
2: Download and Update RubyGems to the latest version from: https://rubygems.org/pages/download
3: Thin I update my pod file. through pod update.