So the good news is that Apple kindly includes a Ruby interpreter. Unfortunately, it tends not to be a recent version:
$ /usr/bin/ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
If you have Homebrew installed, you can get the latest Ruby with:
$ brew install ruby...