Friday, 1 June 2018

CocoaPods: upgrade to 1.5.3 with ruby 2.5.1

Problem

See this error when running pod outdated.

Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

Root Cause

This is because "weak cryptographic standards removed" after 2018 February.

How to Upgrade

Follow the steps by
cocoapods-failed-to-connect-to-github-to-update-the-cocoapods-specs-specs-repo

Run these series of steps to update openssl, then ruby, then cocoapods.

  1. Update brew
  2. Use brew to install latest openssl 2.5.1
  3. Use brew to install : brew install rbenv ruby-build
  4. Use rbenv to install ruby 2.5.1: rbenv install 2.5.1
  5. Use rbenv to set ruby version used : rbenv global 2.5.0
  6. Use rbenv to check ruby version: ruby --version
  7. Use gem to install cocoapods: gem install cocoapods -n /usr/local/bin
  8. Check cocoapods version : pod --version

Use rbenv to install ruby 2.3.7

Run these commands:

  1. Run: rbenv install 2.3.7
  2. Set the ruby version using: export RBENV_VERSION=2.3.7

No comments:

Post a comment