Raghav04/10/2023, 4:53 AM
✖ System ruby is currently used
CocoaPods is not compatible with system ruby installation on Apple M1 computers.
Please install ruby via Homebrew, rvm, rbenv or other tool and make it default
Detailed information: <https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1/66556339#66556339>
✖ cocoapods not found
Get cocoapods from <https://guides.cocoapods.org/using/getting-started.html#installation>
✖ KDoctor has diagnosed one or more problems while checking your environment.
I followed these instructions from the StackOverflow link mentioned For Homebrew: • Execute
Please check the output for problem description and possible solutions.
brew install ruby
(you can find your Homebrew installation directory with
if needed) • Execute
or restart your shell • Make sure you are using the correct
binary by executing
) • Install CocoaPods with
• Make sure you are using the correct
sudo gem install cocoapods
binary by executing
) • Make sure
is version 0.13.0 or more with
, otherwise run
gem info ethon
sudo gem install ethon
Before adding the path to my .zshrc file, executing
returned /usr/bin/ruby and
returned /usr/local after that I followed the second step This is the path I added to my .zshrc file
but as I'm running
in my terminal again it's still showing /usr/bin/ruby but according to the solution it should be (brew --prefix)/opt/ruby/bin/ruby I have made sure that my .zshrc file is getting updated. I guess this is the reason of the failure but I may be wrong any tips on resolving this? Thanks Also I came to know about this channel from the official documentation itself
Pablichjenkov04/10/2023, 6:04 AM
Raghav04/10/2023, 6:29 AM
Dave04/10/2023, 9:10 AM
Konstantin Tskhovrebov04/10/2023, 9:40 AM
Raghav04/10/2023, 9:53 AM
Pablichjenkov04/10/2023, 1:31 PM
Sam Stone04/10/2023, 9:28 PM
and delete all of the files in that folder • Install homebrew (
). • Set homebrew path with
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/my_name/.zprofile
• Edit .zshprofile: replace old path to homebrew with
eval "$(/usr/local/bin/brew shellenv)"
so it looked like this (in my .zshprofile, I also set PATH for my Python install and “export PATH”, not sure if that makes a difference) :
• Update macOS and xcode command line tools (was behind 2 updates) •
eval "$(/usr/local/Homebrew/bin/brew shellenv)" eval "$(/usr/local/Homebrew/bin/brew shellenv)" eval "$(/usr/local/bin/brew shellenv)" eval "$(/usr/local/bin/brew shellenv)"
brew install cocoapods
Worked like a charm!