Could Not Find 'Cocoapods' (>= 0) Among N Total Gem(S) (Gem::Loaderror)

Could not find 'cocoapods' ( = 0) among N total gem(s) (Gem::LoadError)

Finally I got Solution For installation of CocoaPods in OS X El Capitan

First remove or uninstall all available Gems by using following command in your terminal(which is located in your Launchpad>Other>Terminal or you can also find that in Finder>Applications>Utilities>Terminal)

gem uninstall --all
sudo gem uninstall --all

When after successful uninstallation of all Gems, Then write following command in your terminal

sudo gem install -n /usr/local/bin cocoapods
pod setup

Hope all of you will be awaiting for this answer. anyway, this works for me hence according to me it is best suitable solution to that particular problem.

Pod not found: Could not find 'cocoapods' ( = 0) among 64 total gem(s) (Gem::LoadError)

Uninstalling and reinstalling CocoaPods from the Terminal fixed the issue for me (see the CocoaPods documentation for more information):

gem uninstall cocoapods
gem install cocoapods

cocoapods not installing

Using following commands, it worked for me.

  1. sudo gem uninstall cocoapods
  2. sudo gem install -n /usr/local/bin cocoapods
  3. cocoapods pod install

If you encounter this error on step 2:

ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)

Then try this as step 2 instead (step 3 is not needed):

gem install -n /usr/local/bin cocoapods

How to fix the Cocoapods installation setup error?

I have same problem. I got different kinds of error when try different combination of install and uninstall. like

[!] The `master` repo requires CocoaPods 0.32.1 - 

or

.rvm/gems/ruby-2.0.0-p598/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)

or

    .rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require': cannot load such file -- colored (LoadError)
from /Users/riverhuang/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require'
from /Users/riverhuang/.rvm/gems/ruby-2.1.5@global/gems/cocoapods-0.36.2/lib/cocoapods/user_interface.rb:8:in `<module:UserInterface>'
from /Users/riverhuang/.rvm/gems/ruby-2.1.5@global/gems/cocoapods-0.36.2/lib/cocoapods/user_interface.rb:7:in `<module:Pod>'
.
.
.
from /Users/riverhuang/.rvm/gems/ruby-2.1.5/bin/pod:23:in `load'
from /Users/riverhuang/.rvm/gems/ruby-2.1.5/bin/pod:23:in `<main>'
Could not find proper version of cocoapods (0.29.0) in any of the sources
Run `bundle install` to install missing gems.

After clear all gem in my computer I finally fixed it. Here is my steps to clear all gems.

gem uninstall --all
sudo gem uninstall --all

After uninstall all gems I reinstall the cocoapods.

sudo gem install cocoapods

Then restart the Terminal and run:

pod setup

I guess it has conflict in dependency gems (wrong version or not in right path). Like once I run "bundle install" it always install cocoapods 0.29.0 and all its dependency. With and without "sodu" install gems and its dependency to different places with version 0.36.2 when I did it.

ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension

Run following command

 brew cleanup -d -v 

Then run below command

brew install cocoapods 

Note: If you see failed to link then run brew link cocoapods

If linking is getting failed then run

brew link --overwrite cocoapods

This is how it get solved for me

For someone who is having m1 chip system they need to run this via Rosetta

select Terminal and press cmd(⌘)+I and check the "Open using Rosetta" option. ( For m1 chip based mac )

How to run CocoaPods on Apple Silicon (M1)

EDIT: I recently disabled Rosetta, and Cocoapods runs just fine with the addition of the ffi gem.

For anyone else struggling with this issue, I just found a way to solve it. In addition to running terminal in Rosetta:

  1. Right-click on Terminal in Finder
  2. Get Info
  3. Open with Rosetta

I installed a gem that seems to be related to the symbol not found in the error:

sudo gem install ffi

After doing this, cocoapods runs as expected.



Related Topics



Leave a reply



Submit