1、安装gem
yum install gem
2、查看gem源
gem sources -l
3、添加源
gem source -a https://gems.ruby-china.com/
gem source -a http://rubygems.org/
4、安装ruby-devel,否则下一步可能会出现:ERROR: Failed to build gem native extension
yum install ruby-devel
5、安装包
gem install travis
6、安装成功