localhost:PodTest3 haiwang$ pod install
Analyzing dependencies
Downloading dependencies
Installing MBProgressHUD (0.9.2)
Installing Masonry (1.0.2)
Generating Pods p
Run this in the terminal:
sudo gem install xcodeproj
You can easily solve this issue using the follow command:
gem update cocoapods
If the simple uninstall by @haider_kazal doesn't work like it didn't for me, try to install RVM with ruby 2.5.5, then purge CocoaPods completely:
gem uninstall cocoapods
gem uninstall cocoapods-core
gem uninstall cocoapods-deintegrate
gem uninstall cocoapods-downloader
gem uninstall cocoapods-plugins
gem uninstall cocoapods-search
gem uninstall cocoapods-stats
gem uninstall cocoapods-try
gem uninstall cocoapods-trunk
And then install once again:
gem install cocoapods --pre
This is the perfect solution when you are receiving the "Operation not permitted" error or xcode8 cocoapods abort trap:6.
Custom GEM_HOME
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version
1.1.1
I solved this issue by updating the ruby with \curl -sSL https://get.rvm.io | bash -s stable --ruby.