[Ruby] Mac Rails Install Error

less than 1 minute read

Rails could not be installed due to the following error! !!
To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/macintosh/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-17/2.7.0/nokogiri-1.10.10/mkmf.log

extconf failed, exit code 1

I solved it with the following settings.
gem install nokogiri – –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 –use-system-libraries