macoscocoapodsmacos-catalina

zsh: command not found: pod - macOS Catalina 10.15


I'm running the install with an admin account I tried

sudo gem install cocoapods

and

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

They both run fine with following output

Fetching cocoapods-1.9.1.gem
Successfully installed cocoapods-1.9.1
Parsing documentation for cocoapods-1.9.1
Installing ri documentation for cocoapods-1.9.1
Done installing documentation for cocoapods after 2 seconds
1 gem installed

however, a simple

pod --version

Returns

zsh: command not found: pod

I'm not too good at managing users accounts or dealing with command shell but I scoured the net and couldn't find a solution. It looks like wherever pod is installed, it doesn't make it to the list of executable applications


Solution

  • The issue was that command line for XCODE was not installed.

    First I updated to latest Ruby version and put the version number in the second command (in place of [version]

    curl -L https://get.rvm.io | bash -s stable
    
    rvm install ruby-[version] 
    

    During the install you will see the Software update available from MAcOS popup. Install immediately and continue with prompts in that window (I believe it asks for updates and then asks for install.

    It will take a while to run / download / install (it took 2 expressos for me :) )

    After that I ran

    sudo gem install cocoapods
    

    And restarted my terminal. Now checking it's installed

    pod --version
    

    Returns the installed version (1.9.1 for me)