I should also mention I tried brew install ruby and applied the suggested command to add the homebrew ruby to my PATH variable via .bash_profile and sourced the .bash_profile, but still got the same error.
$ brew style
==> Installing or updating 'rubocop' gem
Building native extensions. This could take a while...
ERROR: Error installing rubocop:
ERROR: Failed to build gem native extension.
current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181108-63356-ev02gx.rb extconf.rb
creating Makefile
current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR=" clean
current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR="
make: * No rule to make target /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed byadj_matrix.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1 for inspection.
Results logged to /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.1/gem_make.out
Error: Failed to install/update the 'rubocop' gem.
I hate to sound curmudgeonly, but shouldn't brew's own utilities like brew style "just work" once you've installed homebrew? Or if a dependency is needed, it should tell me what I need to do. This is one of the greatest things about homebrew - it tries to help you with brew doctor and helpful messages. Short of that, I am reluctant to add more dependencies to something -- that is supposed to be my package manager, after all. Perhaps I've done something wrong, and I'm totally willing to troubleshoot and report back. But a bunch of people here hit this problem, and I'm sure there are others who are less vocal or who just gave up on the idea. Hopefully the links I pasted in to my note earlier tonight suggest that homebrew will be taking on more of the task of integrating the needed tools.
Most helpful comment
For those who still have issues with this as I did. I did this: https://github.com/Homebrew/brew/issues/4998#issuecomment-425566799 and it fixed it for me.