Environment: OSX EI 10.11.1
After switching to the gem source yesterday, there was no problem with the pod installation, or it could be used
$ gem Sources--add https://ruby.taobao.org/--remove https://rubygems.org/
$ sudo gem install Cocoapods
Today when the use of the time, under a project to execute pod install half a day or so no response, but the CTRL + C forced to quit. Then the error occurs when you execute it:
Library/ruby/site/2.0.0/rubygems/dependency.rb:318:in ' to_specs ': Could not find ' cocoapods ' (>= 0) among the total gem (s) (Gem::loaderror)
Checked in ' gem_path=/users/xianlong/.gem/ruby/2.0.0:/library/ruby/gems/2.0.0:/system/library/frameworks/ ruby.framework/versions/2.0/usr/lib/ruby/gems/2.0.0 ', execute ' gem env ' for more information
From/library/ruby/site/2.0.0/rubygems/dependency.rb:327:in ' To_spec '
From/library/ruby/site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in ' Gem '
From/usr/local/bin/pod:22:in ' <main> '
The analysis may be due to a corrupted configuration caused by a forced exit program. So the pod unloaded, reinstall after the OK.
To unload Pods:
Step1:
Which pod: View the path where the pod command is located, such as/usr/local/bin/pod, and then execute rm-rf/usr/local/bin/pod to remove the pod command
Step2:
Execute Gem List | grep cocoapods View all installed components related to Cocoapods, and then uninstall them all
The result of my execution here is:
Cocoapods-core (0.39.0)
Cocoapods-downloader (0.9.3)
Cocoapods-plugins (0.4.2)
Cocoapods-search (0.1.0)
Cocoapods-stats (0.6.2)
Cocoapods-trunk (0.6.4)
Cocoapods-try (0.5.1)
Then I'll do it all:
Gem Uninstall Cocoapods-core
Gem Uninstall Cocoapods-downloader
Gem Uninstall Cocoapods-plugins
Gem Uninstall Cocoapods-search
Gem Uninstall Cocoapods-stats
Gem Uninstall Cocoapods-trunk
Gem Uninstall Cocoapods-try
Step3: Re-install pod
Execute sudo gem install cocoapods, prompting for error: While executing gem ... (errno::eperm) Operation not permitted-/usr/bin/pod
The installation to/usr/bin/pods can be successfully installed in the command:
sudo gem install-n/usr/local/bin cocoapods
Installation is successful,
Step4: View the newly installed POD version:
Pod--version
0.39.0
Prompt error:while executing gem when installing pods ... (errno::eperm) Operation not permitted-/usr/bin/pod