Home gem
Post
Cancel

gem

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.

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
This post is licensed under CC BY 4.0 by the author.