I was getting the error:
[error] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe’: can’t find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
To fix this install cocoapods for the user:
First create a .bash_profile if it does not exist:
https://redfinsolutions.com/blog/creating-bashprofile-your-mac
Then remove cocoapods installation:
sudo gem uninstall cocoapods
Then install cocoapods as the user running the gitlab-runner:
Follow the “Sudo-less ” installation guide on:
https://guides.cocoapods.org/using/getting-started.html
Resources: