Error: Xcode alone is not sufficient on High Sierra.
Install the Command Line Tools:
xcode-select --install
xcode-select --install
xcode-select -p
Error: Permission denied @ unlink_internal - /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.10.0/ext/ffi_c/libffi-x86_64-darwin16/include/ffitarget.h
sudo chown -R $(whoami) $(brew --prefix)/*