ruby install fail using brew, error C compiler can not create excutables
Solution 1:
Perhaps I'm missing something, but the issue seems to be stated clearly:
Error: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
I don't use Homebrew because of philosophical differences :) I use MacPorts instead. I just checked, and they do support High Sierra (10.13) & even much "older" versions (Tiger/10.4) that may be downloaded here. MacPorts also maintains a GitHub repo where you may find other useful stuff, post issues, etc.
Most helpfully, MacPorts provides installation instructions for both Macports and Xcode for all supported versions. Apple still sources vintage versions of Xcode and the "Command Line Tools" on their Developer's Site.