Building flutter app for iOS fails with the error “CocoaPods is installed but broken. Skipping pod install.” The build was working fine till a few days ago and started failing without any changes being made to the build configuration. I added steps to update cocoapods but it did not help.
[Are you using shell or bash as this pass report indicates that shell (sh) could cause issues
Hello,
Building a Flutter app for iOS it always fails with an error called “CocoaPods is installed but broken. Skipping pod install”
Warning: CocoaPods is installed but broken. Skipping pod install.
[15:23:37]: ▸ You appear to have CocoaPods installed but it is not working.
[15:23:37]: ▸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[15:23:37]: ▸ This can usually be fixed by re-installing CocoaPods.
I tried to reins…
I did not find a way to specify if it should use shell or bash. I guess the build uses whatever is default. Is there a way to specify that it should use bash for running commands?
If you not switching shells in your config.yml then the default should be bash, which in turn means that the post I referenced is not relevant.
As for changing shells and the default setting you can find the details here
As for the issue, I’m not sure I can be much help. The following report over at the CocoaPods github may provide some leads to follow.
opened 04:44PM - 31 Mar 19 UTC
t2:defect
d1:easy
s2:confirmed
<!--
ℹ Please fill out this template when filing an issue.
All lines beginning… with an ℹ symbol instruct you with
what info we expect.
Before you start, are you using the latest CocoaPods release?
A lot changes with Xcode releases that are not backwards compatible.
Not an issue about the CocoaPods command line app? Please file an issue in the appropriate repo - https://github.com/CocoaPods
Issues are for feature requests, and bugs; questions should go to Stack Overflow
Using CocoaPods <= 0.39: https://blog.cocoapods.org/Sharding/
Using Xcode 8: Requires CocoaPods 1.1.0 or above.
Issue with Nanaimo not loading:
Please run `[sudo] gem uninstall nanaimo` and remove all but the latest version.
Issues with `pod search`? Try deleting your cache `rm -rf ~/Library/Caches/CocoaPods`first.
-->
* I've read and understood the [*CONTRIBUTING* guidelines and have done my best effort to follow](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md).
# Report
## What did you do?
Run `pod`.
## What did you expect to happen?
Um... not error out, I guess :D
## What happened instead?
I got an error message:
```
iMac-ForceBru:Pyto forcebru$ pod
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("git version 2.19.GIT\n") (RuntimeError)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'
```
## macOS info
A relatively fresh install of macOS Mojave 10.14.4. I tried uninstalling and re-installing CocoaPods. The reinstallation succeeded (I mean, it's the first time I'm installing it anyways).
## CocoaPods Environment
No idea:
```
iMac-ForceBru:Pyto forcebru$ pod env
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("git version 2.19.GIT\n") (RuntimeError)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'
```
## Project that demonstrates the issue
I'm trying to build [Pyto](https://github.com/ColdGrub1384/Pyto), but I can't even start the `pod` command, so I guess it's unrelated.
1 Like
I appreciate your help. I will check the links you shared and see if I can find something. Thank you.