Unable to Load Gem Cocoa Pods While Creating Repo

unable to load gem cocoa pods while creating repo

Hey I had the same problem that you have, I solve it following the next steps:

(I strongly recommend to use rvm to manage ruby versions)

  1. Remove cocoapods using gem uninstall cocoapods
  2. Install rvm, to do this I followed this steps
    https://rvm.io/rvm/install
  3. After that reinstall cocoapods using gem install cocoapods
  4. run pod setup

And after that everything works like a charm!.

You could notice that I didn't use sudo.

Hope it could helps you.

EDIT: If you have a slow internet connection it could take several minutes, to check the progress or steps use pod setup --verbose

Error: Could not find 'cocoapods' while installing a Pod

First of all Uninstall CocoaPods using sudo command.

Follow below steps :

  1. sudo gem uninstall cocoapods
  2. gem install cocoapods
  3. pod install

When you install again then do not use sudo command.
You can find for sudo less installation from here.

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 )

can't install Cocoapods after installed Ruby

I would recommend using RVM or Rbenv for managing your ruby versions. To install cocoapods you can do gem install cocoapods. Then, in your project folder you can run pod install.

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 install is staying on Setting up CocoaPods Master repo

You could try running in verbose mode:

pod install --verbose

That'll show you what cocoa pods are up to:

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master
Cloning into 'master'...

(as suggested here)

For me the above step took quite a long time as the repo (Dec 2016) is now 1.1 GB

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.



Related Topics



Leave a reply



Submit