How to Fix Cocoapods Install Errors on an Apple Silicon Macs

preview_player
Показать описание
This is a followup tutorial on how to fix and correctly install Cocoapods on your Apple Silicon machine(M1,M2).

MacOS comes preinstalled with an oudated ruby version that gem tries to install binaries for. We are going to learn how to properly fix this and get the right version of ruby installed in your machine.

ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory

Getting Started Guide

Ruby

Homebrew

Commands
brew install ruby-install chruby

Edit the .zshrc file
vi ~/.zshrc or sudo vi ~/.zshrc

chruby ruby-3.1.2

Install the latest ruby
ruby-install --latest ruby

Finally install cocoapods
sudo gem install cocoapods

Buy Me Coffee

Social

Shot with Sony ZV-E10

My Workstation Setup
Macbook Pro 16 inch M1 Pro

Samsung 28-Inch 4K UHD Led-Lit Monitor

Apple Magic Keyboard with Touch ID and Numeric Keypad
Рекомендации по теме
Комментарии
Автор

if you are following along, there is no need to use sudo when editing the .zshrc file. simply run vi ~/.zschrc

JustAnotherDangHowToChannel
Автор

Why have only 1k people found this video? :) You rock!! Thank you so much! :)

theghosthuntergal
Автор

I was stuck with this problem for a few days now, was trying to setup environment for KMM. This video worked perfectly. Thank you so much for taking the time to create this video and explaining everything in detail.

asadullahilyas
Автор

Day 1: Can't use flutter, can't download Cocoapods. Two calls to Apple support with no results. Tried everything else on the web, no results. Day 3: Finally, I can user Flutter now. THANK YOU SO MUCH!!!

MrVanhovey
Автор

should update title to say "and intel macs too", this worked perfectly

redxblood
Автор

I am new on macbook m3 and was struggling to install cocapods last 2 days untill I see your vlog. Thankyou co much. <3

findrashid-opzo
Автор

thaaanx it work ...
note: if u face this problem "chruby: unknown Ruby: ruby-3.1.2", ,, back to step that we write (sudo vi ~/.zshrc ) then change 3.1.2 to last version ... when i write this comment the last version is 3.2.1

sultantofoman
Автор

Thank you so much for creating this video! I am new to developing and I was getting increasingly frustrated with all the info out there that doesn't work. Your video was simple and easy to follow and it worked!

Iam_rayhutch
Автор

Finally, this worked for me!
You are a lifesaver, thanks a lot!

For anyone who got an error during this, go check which brew, and If there is no/opt/homebrew/bin/brew, you gotta reinstall brew or change the install path, that is what I did before trying this video’s solution.

たけのこ-eqb
Автор

You are the greatest person for first day of 2024, i was hopeless for 2 months and stopped my project development. Your guide helped me very well. I hope new year will be great for you. Thanks for your efforts.

yecoof
Автор

Man, really thank you for this!!! At first it didn't work, maybe you should mention in 4:55 that the CURRENT version should be typed in, since I'm doing this a half year later and 3.2.0 released, it will fail to update if your version is put in. Maybe you could add a YouTube-hint at this point, I'm sure some others will also fail. Thank you so much for this really, I've been struggling around with this for over 4 hours and searched my way to different forums cuz I couldn't make a unity build because wrong pods have been installed. You saved my day <3 followed u up

gushhle
Автор

Thank you man! This video needs to be bundled with every apple silicon mac being sold. LOL

amadzarak
Автор

If you didn't make this video for us I could never fix this problem. Thanks!!

hasancanbalay
Автор

good god this almost screwed my entire dev team over. But you saved the day!! Subscribed!! Thank you :D

reece
Автор

thank you so much bro it really worked, from the last three I spend hours on YouTube tutorials none of them worked and finally I found this. thank you so much one again

Thesaeedahmad
Автор

I have been trying for the past 3 days to solve the cocoapods error for flutter (Macbook Inter Ver); I installed it successfully. Thank you, Buddy! You are the best. 👍

sevengraphicstudio
Автор

i was stuck with this problem for almost a month, thanks to your video i was able to solve it.
THANK YOU SO MUCH!

AlonsoMtz-sm
Автор

Work for me! After 4 hours of trying, you saved my life!

salvatorecasalino
Автор

Great video. Thanks for the easy to follow tutorial. You got me out of a real bind getting cocapods installed!

matthewjdoyle
Автор

Such a helpful video. I was stuck and this helped me out. Thanks so much

hkpatnaik