Execution sudo gem install cocoapods
Error occurred:
Error:while Executing gem ... (errno::eperm) Operation not permitted-/usr/bin/xcodeproj
Custom Gem_home
$ mkdir-p $HOME/software/ruby
$ export gem_home= $HOME/software/ruby
$ gem Install cocoapods
[...]
1 Gem installed
$ export path= $PATH: $HOME/sofware/ruby/bin
$ pod--version
0.39.0
Execute this sentence if the following error is reported:
Error:could not find a valid gem ' cocoapods ' (>= 0), where is why:
Unable to download data from&n bsp;https://rubygems.org/ -errno::etimedout:operation timed Out-connect (2) (Https://rubygems.org/latest_ specs.4.8.gz)
Error:possible alternatives:cocoapods
This is because Ruby's software source rubygems.org because of the use of Amazon cloud services, was blocked by my celestial, need to update the source of Ruby, the process is as follows:
$ gem sources-l (view the source of the current ruby)
$ gem Sources--remove https://rubygems.org/
$ gem sources-a https://ruby.taobao.org/
$ gem sources-l
If the gem is too old, you can try upgrading the gem with the following command
$ sudo gem update--system
After successful upgrade, you will be prompted: RubyGems system software updated
10.11 cocoapods install sudo gem install-n/usr/local/bin cocoapods
mark~ 10.11 Cocoapods Installation