macOS_SDK_headers_for_macOS_10.14.pkg doesn't exist on my system
Please consider using Homebrew to install rbenv instead of using system Ruby. Then configure it to your liking and get the gems you need. Please see this Homebrew, Ruby, and Gems article for details.



To install Homebrew, if you have not yet, or if you had trouble with it, please follow this Install homebrew on MacOS Mojave  article or find a similar for your version of MACOS. The important thing is to agree to Command Line Tools License Agreement that may popup (or stay hidden?) in the middle of the install, and may prevent you from finishing the install.