I am using a MacBook Pro (M2 Max) with Ventura 13.4.1
When trying to install cocoapods using sudo, I the following error:
Error installing cocoapods:
The latest version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 220.127.116.11.
Try installing it with 'gem install activesupport -v 18.104.22.168 and then run the command again.
Activesupport requires Ruby version >= 2.7.0 The current ruby version is 22.214.171.124.
Any help is apprciated.
When I try installing as directed I get a permissions error on a folder.
Welcome to the community.
To be honest you are better off using Swift Package Manager (SPM) to install 3rd party libraries rather than use cocoapods. SPM is the preferred choice since it is way simpler and most of the vendors who provided frameworks via cocoapods have made their frameworks available by SPM.
Should you wish to pursue installing cocoapods on an M1 or and M2 Mac the recommendation is that you should install HomeBrew first and then use HomeBrew to install cocoapods.
To install HomeBrew use this command in terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
To install cocoapods with HomeBrew use this command in terminal:
brew install cocoapods
Thank you Chris! I’m a newbie to SWIFT and did not realize that SPM was right in front of me until I got part of the way down the path using sudo. I was following the course on Firebase, so maybe Chris needs to update that course to let users with newer versions know to use SPM.
I was able to keep moving! Thanks again.
To be honest with you I doubt that Chris has time to modify that course since the focus these days is entirely on the rapid changes in SwiftUI and getting courses out to take advantage of the recent changes highlighted in WWDC23. Re-recording videos is a very time consuming process and a lot of planning takes place before a recording session gets underway. It then has to be edited and that takes time. I think for Chris it’s a matter of priorities and what’s the most important.
I think it would take less than an hour to draft up a quick 1.2.3. guide to installing using SPM instead of cocoapods. Even coming through the forum it’s taken me about an hour to troubleshoot cocopods and figure out how to do it using SPM because the information isn’t centralized and I ran through 3 different errors trying to follow the steps in the viedo before I redirected.
The beginning of the course says that updates will be noted in text below the video. So, it would be nice to have some text below the videos for both the M1 additional steps and the lesson 3 on creating a Firebase.