Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danman01/3115c4027f59e1241eb8731424a101e1 to your computer and use it in GitHub Desktop.
Save danman01/3115c4027f59e1241eb8731424a101e1 to your computer and use it in GitHub Desktop.
Ruby on Rails install after Mojave upgrade - getting Nokogiri and C compiler working

I had to run the following cryptic commands to get my C compiler working in mac osx Mojave, after having everything working fine in a previous OS (Yosemite I think it was...)

This is an (somewhat) obvious step when upgrading osx:

xcode-select --install

I also had to do this, which I never would've known how to do without google and this post

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Finally, I had to agree to the xcode license (found I had to do this via the makefile logs when install of nokogiri failed...)

sudo xcodebuild -licence

It'll prompt you to eventually type "agree"

Finally, continuing with bundle works as expected for a new rails project. Success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment