Download the tar package
Ruby source package download address:
http://www.ruby-lang.org/en/downloads/
decompress
tar zxvf ruby-2.5.1.tar.gz
Go to the unzipped directory
execute in sequence
./configure #检查包文件
make && make install #编译源码,底层是由c写的
an examination
ruby -v