Error: "Could not find cocoapods when installing Pod

I tried using pod installin my project to implement the SDK, but it throws this error:

/Library/Ruby/Site/2.0.0/rubygems/dependency.rbhaps18:in 'to_specs': Could not find "cocoapods" (> = 0.a) among 35 all gems (Gem :: LoadError) Checked in 'GEM_PATH = / Users / admin / .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 ', run gem envfor 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 ``

Does anyone know what causes and how to fix it?

+4
source share
3 answers

First of all, uninstall CocoaPods using the sudo command.

Follow the instructions below:

  • sudo gem uninstall cocoapods
  • gem install cocoapods
  • pod install

When reinstalling, do not use the command sudo. You can find sudo less installation from here.

+13
source

This issue is related to updating Ruby. Therefore, you should apply the following steps:

  • sudo gem remove cocoapods
  • sudo gem install activesupport -v 4.2.6
  • gem install cocoapods
+1
source
  • Xcode 6
  • ""
  • Command Line Tools Xcode
  • cocoapods
    $ sudo gem uninstall cocoapods
  • xcodeproj $ sudo gem uninstall xcodeproj
  • xcodeproj
    $ sudo gem install xcodeproj
  • cocoapods
    $ sudo gem install cocoapods
  • pod --version, , .
0

Source: https://habr.com/ru/post/1623908/


All Articles