Add Ruby version checking in setup.sh

In order to prepare the Ruby environment, I added Ruby version checking
in setup.sh. If there is no ruby or the ruby version is low, use RVM to
install the latest Ruby.