React Native ERROR: Failed to build gem native extension.

tanut aran
Apr 17, 2021

--

This occurs when I try to install CocoaPod as recommended in the React Native Docs referred here

https://reactnative.dev/docs/environment-setup#cocoapods

sudo gem install cocoapods

Solution

In my case I solve this by upgrading Ruby to 2.6.6

Warning: Please check the version again. This is as of 18 April 2021

This is done cleaner by Ruby version manager

https://rvm.io/

curl -sSL https://get.rvm.io | bash -s stable

Then do the upgrade

rvm install ruby-2.6.6rvm use ruby-2.6.6rvm --default use 2.6.6

And it works !

Cheers !

--

--

tanut aran
tanut aran

Written by tanut aran

Co-founder and Coder at work !

No responses yet