on mac os sierra, stuck on "Setting up CocoaPods master repo" - ruby-on-rails

After moving to mac os sierra, I completely formatted my mac now I'm facing problem to install cocoapods, every time I run sudo gem install cocoapods --pre
every thing installed well, and when I try to install a pod, the terminal stack on Setting up CocoaPods master repo
.
Already updated the system with sudo gem update --system and still got the same problem, searched online to found old answers to use pod install --verbose
Ss I found in THIS answer fail again tells to install it manually.
NOTE : I have the latest version of 'Command Line Tools'. Any suggestion or how to install master repo manually?

From https://stackoverflow.com/a/21852985/1033581:
on 4th Nov 2016, the repo is 1.07 GB
From https://stackoverflow.com/a/33699136/1033581:
To get a progression, you can clone master yourself:
pod repo remove master
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod setup

In my first installation, I got the same problem too, it takes too much time in "setting up master repo".
Actually, you can see it through "activity monitor" that it's actually downloading, but it seems the connection is slow from the server.
Try these steps, it solves my problem:
1. pod setup
It will do "setting up master" again, don't wait, continue these steps below:
2. Ctrl +C
3. pod repo remove master
4. cd ~/.cocoapods/repos
5. git clone --depth 1 https://github.com/CocoaPods/Specs.git master
It takes less than 7 minutes for me (I think it depends on internet connection), then I can do pod install.

Related

React Native Invalid Podfile file: [!] Unable to locate the executable node

I'm using Macbook pro-2020 apple M1 Chip, I have created a new ReactNative project and it runs fine on the simulator but if i have to install any other plugins, and have to install pods. it gives me errors like this.
i have installed all the requirements app running fine but once it comes pod installs it fails each and every time. any help would be much appericiated.
I believe this has been answered in how-to-running-cocoapods-on-apple-silicon-m1
I recommend following the updated answer for 2022. If you haven't already, use Homebrew, even tho it's not recommended by the maintainers. M1 with ARM architecture is amazing but many libraries are still not compatible and need to be run in x86 mode.
I would uninstall everything, including and gems you used originally, and run the following Homebrew commands and link them all....
brew install node
brew install yarn
brew install cocoapods
Reinstalling those should now work when you run pod install inside your ios file. This is what worked for me. Hope this helps.
I was facing the same error, this is what worked for me:
I first reinstalled the node, yarn, CocoaPods, after that I run the following commands:
brew link cocoapods
If still gives you error, remove old linked pod using following command:
rm '/opt/homebrew/bin/pod'
Now run this command again:
brew link cocoapods
Once the above command works successfully, then move to your project's iOS folder and run the following command:
pod install

How to nuke a Cocoapods installation and start over with Github master

I am presently taking a course in iOS development and we use Github to submit work to instructors. Last night, I did an assignment on a project I've been working on for several days, committed the repo and stopped for the day.
This morning, I began another lesson that involved installing Cocoapods. I created a branch off of last night's branch (not the master) and installed a Cocoapod on it (Xcode was closed while I installed a Cocoapod). When I realized I was working off the wrong branch, I switched to the master branch and typed
git branch -d install-cocoapods to remove the local branch
I then checked out the master, opened it in Xcode thinking I'd see my master file, but I see remnants of Cocoapods. I checked Github and I see the last update was last night, but I can't get rid of the local references to the Cocoapods I attempted to install in on the wrong branch from this morning.
I checked Github and the project I saved last night is there, but I've been unsuccessful nuking local references to my project. How would I get rid of them and start with a clean "master" file from Github?
Remove all Pod files with this command:
rm -rf Podfile.lock Pods/
Stash all changes and then move to master:
git stash -a
git checkout master
Now write new Podfile and run:
pod install
I normally use git clean -fxd.
This single command will remove all untracked and ignored files and directories, and, most of the time, take your repo back to it's "cleanest" state.
But beware that this command will potentially remove any files that haven't been tracked. So please make sure that you have all the files you want to keep tracked.

Cocoapods, fail to use pod setup and pod install

I have problem in setting up Cocoapods using command pod setup, with an error say SSLRead() fail. I have found a workaround in downloading the Specs of Cocoapods manually. However, when I need to install the library using command pod install in my project directory, problems regarding to SSL remains. The returns are as below:
Downloading dependencies
Installing AFNetworking (2.2.1)
[!] Error installing AFNetworking
[!] /usr/bin/git clone https://github.com/AFNetworking/AFNetworking.git/Users/DavisChung/Documents/Programming/Xcode\ Projects/TapBit/Pods/AFNetworking --single-branch --depth 1 --branch 2.2.1
Cloning into '/Users/DavisChung/Documents/Programming/Xcode Projects/TapBit/Pods/AFNetworking'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': Server aborted the SSL handshake
One for all, how can I resolve the problems regarding to SSL?
My mac OS version is Yosemite 10.10.2
Thanks
After having the same issue, I have realized that my network provider decides to randomly check if I am human. There might be another solution, but when running from terminal, There is no additional way to response. Therefore, the network provider is that one that might cause the issue.
To that my solution was to change network, then re-run pod install. The pods did updated once I did.
it seems that your network working under proxy.For this case you need download project from github point this directory inside the podfile
pod 'MyPod', :local => "/Path/To/Pod"

CocoaPods update. Terminal shows previous version [duplicate]

This question already has answers here:
podfile gives an error on install
(3 answers)
Closed 9 years ago.
I tried to update cocoapods gem with command sudo gem install cocoapods. After few minutes on installation I saw Successfully installed cocoapods-0.29.0. But when I type pod --version got 0.27.1 again. Moreover when I try pod install terminal shows me this error:
[!] Pod::Executable pull
A ALPValidator/0.0.1/ALPValidator.podspec
A Apptimize/1.5.8/Apptimize.podspec
A BloodMagic/0.5.2/BloodMagic.podspec
U CardIO/3.2.2/CardIO.podspec
U CardIO/3.3.0/CardIO.podspec
U CardIO/3.4.0/CardIO.podspec
U CardIO/3.4.3/CardIO.podspec
...
How can I solve this problem?
On January 28 the Cocoapods Specs repo broke -- here's the full explanation and fix:
A bug was found in libgit2 and they had to execute a force push on the specs repo in order to fix the issue. This is what broke everyone CocoaPods setup.
You can find the details on what to do here.
Meanwhile you can use this quick fix :
rm -rf ~/.cocoapods/
pod setup

pod install not working after updating cocoapods to 0.29

Here is what i did and got error.
I wanted to use grabkit : https://github.com/pierrotsmnrd/grabKit
Before using it in my project, i updated my ruby to 2.0.0p247 and cocoapods to 0.29.
and then whenever i m going to any of my projects and try to do pod install. It gives me error saying --
"Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm '
as appropriate to mark resolution, or use 'git commit -a'"
Prior to this i was working on a repo, which i cloned, made some changes and committed.
After getting this error, i deleted that repo from my computer. and listed down all the git repos and i am 100% sure that i haven't touched any other git repo on my computer(in terms of making any changes)

Resources