Install Cocoapods In Mac Os Catalina

$ sudo gem install cocoapods -pre If you originally installed the cocoapods gem using sudo, you should use that command again. Later on, when you're actively using CocoaPods by installing pods, you will be notified when new versions become available with a CocoaPods X.X.X is now available, please update message. Unable to install Cocoapods on macOS Catalina 10.15.7 You’re now watching this thread and will receive emails when there’s activity. Click again to stop watching or visit your profile/homepage to manage your watched threads. It looks like CocoaPods 1.9.0, the latest version as of this writing, depends on a newer version of Ruby than 2.3.7. But macOS Mojave only includes Ruby 2.3.7, so you have a few different options. Upgrade to macOS Catalina and get Ruby 2.6.3. Use Ruby Version Manager to install a newer version of Ruby. Install an older version of CocoaPods.

CloudStack.Ninja is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Select Install macOS (or Install OS X) from the Utilities window, then click Continue and follow the onscreen instructions. Learn more For more information about the createinstallmedia command and the arguments that you can use with it, make sure that the macOS installer is in your Applications folder, then enter this path in Terminal.

First, check the version of Ruby you are using.
2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
usr/bin/ruby
Now use Homebrew to install the latest Ruby.
> rubyBy default, binaries installed by gem will be placed into:/usr/local/lib/ruby/gems/2.7.0/binYou may want to add this to your PATH.ruby is keg-only, which means it was not symlinked into /usr/local,because macOS already provides this software and installing another version inparallel can cause all kinds of trouble.
If you need to have ruby first in your PATH run:
$ echo 'export PATH='/usr/local/opt/ruby/bin:$PATH' >> /Users/xxx/.bash_profile
(For newer mac the file name will be : .zprofile )
For compilers to find ruby you may need to set:
$ export CPPFLAGS='-I/usr/local/opt/ruby/include'
Follow the instructions to set PATH. Now you will go to see the installed Ruby. Make sure to replace the 'xxx' with your username.

Install Cocoapods In Mac Catalina

Cocoapods
$ echo 'export PATH='/usr/local/opt/ruby/bin:$PATH' >> /Users/xxx/.bash_profile
$ echo 'export LDFLAGS='-L/usr/local/opt/ruby/lib' >> ~/.bash_profile
$ echo 'export CPPFLAGS='-I/usr/local/opt/ruby/include' >> ~/.bash_profile
Update
$ source ~/.bash_profile
(For newer mac the file name will be : .zprofile )
Finally, Make sure your PATH is in place.
Install cocoa pods in mac os catalina os
$ ruby -vruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
/usr/local/opt/ruby/bin/ruby
You're good to go! Make sure you install by specifying the save destination as follows.

Install Cocoa Pods In Mac Os Catalina Os

$ sudo gem install -n /usr/local/bin cocoapods