Skip to content

Instantly share code, notes, and snippets.

@patharanordev
Created March 6, 2021 05:44
Show Gist options
  • Save patharanordev/e8d2b3aad2ec261abfe623c1ef7cc03f to your computer and use it in GitHub Desktop.
Save patharanordev/e8d2b3aad2ec261abfe623c1ef7cc03f to your computer and use it in GitHub Desktop.

Fixed gem install cocoapods

If you found error message like this :

Error installing cocoapods: ERROR: Failed to build gem native extension

You should re-install ruby first before install cocoapods.

$ brew reinstall ruby

Add the below to your path

$ export PATH="/usr/local/opt/ruby/bin:$PATH"

If needed add these flags.

$ export LDFLAGS="-L/usr/local/opt/ruby/lib"
$ export CPPFLAGS="-I/usr/local/opt/ruby/include"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment