1
gem list --local | grep cocoapods
TroubleShooting
Updating to latest version of CocoaPods?
1
2
3
sudo gem install cocoapods
pod setup
pod --version
How to upgrade rubygems
1
2
# upgrade gem
gem update --system
1
2
# upgrade outdated gems
sudo gem update `gem outdated | cut -d ' ' -f 1`
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
You are correct that macOS won’t let you change anything with the Ruby version that comes installed with your Mac. However, it’s possible to install gems like bundler
using a separate version of Ruby that doesn’t interfere with the one provided by Apple.
If you would like the flexibility of easily switching between many Ruby versions [RECOMMENDED]
- chruby and ruby-install. These can be installed with Homebrew:
1
2
3
brew install chruby ruby-install
# install latest ruby
ruby-install ruby
If you choose to use Homebrew to install Ruby despite my warnings, you’ll be on your own if you run into any issues.
1
2
3
brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.1.0/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc