Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocoapods permission issue in High Sierra?

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

Than i tried

 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.
Zubair-mac-mini:~ sdsol$

any help would be greatly appreciated.

like image 377
Nisar Ahmad Avatar asked Sep 28 '17 13:09

Nisar Ahmad


People also ask

Do I need Ruby to install CocoaPods?

Cocoapods is built on top of Ruby, so you would need to install that in your system before using Cocoapods.

What is latest version of CocoaPods?

1.11. 3 - March 16, 2022 (287 KB)


1 Answers

I had the same problem after upgrading to macOS High Sierra and got it fixed with following commands (note, you need to use sudo to run as super user):

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

Good luck!

like image 196
marknote Avatar answered Oct 13 '22 12:10

marknote