I got a new MacBook Pro for work that is running Sonoma 14.2.1 on an M3. I'm trying to install Cocoapods but it seems to fail even though it "succeeds". Below is what I get when I run it - all seems well.
sudo gem install cocoapods -v 1.13.0
Successfully installed cocoapods-1.13.0
Parsing documentation for cocoapods-1.13.0
Done installing documentation for cocoapods after 0 seconds
1 gem installed
When I try to look for it with gem list
I do see it listed:
cocoapods (1.13.0)
cocoapods-core (1.14.3, 1.13.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1, 1.6.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)
But when I try to run it, I get:
% pod
zsh: command not found: pod
Clearly I'm missing a step somewhere, but *what? *How do I get more information so I can figure out what may be amiss? I've tried this both in Rosetta and outside of it.
I installed ruby 3.0 - when I tried it using gem it failed with a make error:
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
but when I did it with brew it was fine.
Could this be a path issue? On my older Mac running Ventura on an M1 Cocoapods is under ~/.rvm/gems/ruby-3.0.0/bin/pod . Could it be putting it somewhere else since the installation wasn't in Rosetta at first?
I used an answer from here: zsh: command not found: pod - macOS Catalina 10.15
But to summarize - uninstall every single cocoapods gem, use brew, and then reboot. That did it.