Started getting this error everytime we installed a new Ruby version:
An error occurred while installing nokogiri (18.104.22.168), and Bundler cannot continue.
Make sure that
gem install nokogiri -v '22.214.171.124' succeeds before bundling.
After scrolling up you see that liviconv is missing.
Try these steps to correct:
Then install a newer version of libiconv:
brew install libiconv
Then link your new iconv libs:
brew link libiconv
After running the above command, tank note of where libiconv is stored
Warning: Already linked: /usr/local/Cellar/libiconv/1.14
Then install your gem:
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14