Updating Ruby & CocoaPods on MacOS High Sierra
This is on my good old MBA, with macOS High Sierra. I need to use cocoapods and ruby “xcodeproj” gem for GoogleMobileAds + mediation. I had used it quite some time before, but switched to another MBP where latest XCode is available, so environment on this MBA is quite outdated.
cocoapods can be updated with “pod update” fine; however it prompts me to update cocoapods itself with “sudo gem install cocoapods”. Running that gives an error “ERROR: Failed to build gem native extension.” and suggestion “You have to install development tools first.”. Looks like my ruby itself is outdated.
So, “brew install ruby” time. Before that can happen, “brew update” to update homebrew itself.
“brew install rbenv ruby-build” seems to be needed.
Most importantly “xcode-select install” the xcode command-line tools, since the failure logs showed that ‘ruby/config.h’ is not found when building native extensions.
Succeeded updating Cocoapods after all these.













