Try follow this guide, specifically the one about "Gem Errors"
Careful to follow them closely and search up anything you doubt
https://medium.com/faun/macos-catalina-xcode-homebrew-gems-developer-headaches-cf7b1edf10b7
I'm not too experienced with the Terminal so I bet that'll help more than I can. It appears II got mine working purely by chance after tearing several files and stuff apart