Install ruby via RVM
1. Install RVM and refer to https://rvm.io/
-- gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-- \curl -sSL https://get.rvm.io | bash -s stable
[jiaxiaol@usda5p-scop01-admtool~]$gpg--keyserverhkp://keys.gnupg.net--recv-keys409B6B1796C275462A1703113804BB82D39DC0E37D2BAF1CF37B13E2069D6956105BD0E739499BDBgpg:directory`/home/jiaxiaol/.gnupg'createdgpg:newconfigurationfile`/home/jiaxiaol/.gnupg/gpg.conf'createdgpg:WARNING:optionsin`/home/jiaxiaol/.gnupg/gpg.conf'arenotyetactiveduringthisrungpg:keyring`/home/jiaxiaol/.gnupg/secring.gpg'createdgpg:keyring`/home/jiaxiaol/.gnupg/pubring.gpg'createdgpg:requestingkeyD39DC0E3fromhkpserverkeys.gnupg.netgpg:requestingkey39499BDBfromhkpserverkeys.gnupg.netgpg:/home/jiaxiaol/.gnupg/trustdb.gpg:trustdbcreatedgpg:keyD39DC0E3:publickey"MichalPapis(RVMsigning)<mpapis@gmail.com>"importedgpg:key39499BDB:publickey"PiotrKuczynski<piotr.kuczynski@gmail.com>"importedgpg:noultimatelytrustedkeysfoundgpg:Totalnumberprocessed:2gpg:imported:2(RSA:2)[jiaxiaol@usda5p-scop01-admtool~]$[jiaxiaol@usda5p-scop01-admtool~]$\curl-sSLhttps://get.rvm.io|bash-sstableDownloadinghttps://github.com/rvm/rvm/archive/1.29.2.tar.gzDownloadinghttps://github.com/rvm/rvm/releases/download/1.29.2/1.29.2.tar.gz.ascgpg:SignaturemadeThu22Jun201704:18:38PMGMTusingRSAkeyIDBF04FF17gpg:Goodsignaturefrom"MichalPapis(RVMsigning)<mpapis@gmail.com>"gpg:aka"MichalPapis<michal.papis@toptal.com>"gpg:aka"[jpegp_w_picpathofsize5015]"gpg:WARNING:Thiskeyisnotcertifiedwithatrustedsignature!gpg:Thereisnoindicationthatthesignaturebelongstotheowner.Primarykeyfingerprint:409B6B1796C275462A1703113804BB82D39DC0E3Subkeyfingerprint:62C9E5F4DA300D94AC36166BE206C29FBF04FF17GPGverified'/home/jiaxiaol/.rvm/archives/rvm-1.29.2.tgz'InstallingRVMto/home/jiaxiaol/.rvm/AddingrvmPATHlineto/home/jiaxiaol/.profile/home/jiaxiaol/.mkshrc/home/jiaxiaol/.bashrc/home/jiaxiaol/.zshrc.Addingrvmloadinglineto/home/jiaxiaol/.profile/home/jiaxiaol/.bash_profile/home/jiaxiaol/.zlogin.InstallationofRVMin/home/jiaxiaol/.rvm/isalmostcomplete:*TostartusingRVMyouneedtorun`source/home/jiaxiaol/.rvm/scripts/rvm`inallyouropenshellwindows,inrarecasesyouneedtoreopenallshellwindows.#jiaxiaol,##ThankyouforusingRVM!#WesincerelyhopethatRVMhelpstomakeyourlifeeasierandmoreenjoyable!!!##~Wayne,Michal&team.Incaseofproblems:https://rvm.io/helpandhttps://twitter.com/rvm_io*WARNING:Youhave'~/.profile'file,youmightwanttoloadit,todothataddthefollowinglineto'/home/jiaxiaol/.bash_profile':source~/.profile
2. Check the available version
[jiaxiaol@usda5p-scop01-admtool~]$rvmlistknown
3. Install ruby 2.4.0:
[jiaxiaol@usda5p-scop01-admtool~]$rvminstall2.4.0Searchingforbinaryrubies,thismighttakesometime.Nobinaryrubiesavailablefor:centos/7/x86_64/ruby-2.4.0.Continuingwithcompilation.Pleaseread'rvmhelpmount'togetmoreinformationonbinaryrubies.Checkingrequirementsforcentos.Installingrequirementsforcentos.Installingrequiredpackages:libyaml-devel,readline-devel,libffi-devel,sqlite-devel.........Requirementsinstallationsuccessful.InstallingRubyfromsourceto:/home/jiaxiaol/.rvm/rubies/ruby-2.4.0,thismaytakeawhiledependingonyourcpu(s)...ruby-2.4.0-#downloadingruby-2.4.0,thismaytakeawhiledependingonyourconnection...%Total%Received%XferdAverageSpeedTimeTimeTimeCurrentDloadUploadTotalSpentLeftSpeed10011.9M10011.9M006499k00:00:010:00:01--:--:--6499kruby-2.4.0-#extractingruby-2.4.0to/home/jiaxiaol/.rvm/src/ruby-2.4.0....ruby-2.4.0-#configuring..................................................................ruby-2.4.0-#post-configuration..ruby-2.4.0-#compiling.................................................................................ruby-2.4.0-#installing...........................ruby-2.4.0-#makingbinariesexecutable..ruby-2.4.0-#downloadingrubygems-2.6.12%Total%Received%XferdAverageSpeedTimeTimeTimeCurrentDloadUploadTotalSpentLeftSpeed100749k100749k002842k0--:--:----:--:----:--:--2851kNochecksumfordownloadedarchive,recordingchecksuminuserconfiguration.ruby-2.4.0-#extractingrubygems-2.6.12....ruby-2.4.0-#removingoldrubygems.........ruby-2.4.0-#installingrubygems-2.6.12.........................ruby-2.4.0-#gemsetcreated/home/jiaxiaol/.rvm/gems/ruby-2.4.0@globalruby-2.4.0-#importinggemset/home/jiaxiaol/.rvm/gemsets/global.gems...............................................ruby-2.4.0-#generatingglobalwrappers........ruby-2.4.0-#gemsetcreated/home/jiaxiaol/.rvm/gems/ruby-2.4.0ruby-2.4.0-#importinggemsetfile/home/jiaxiaol/.rvm/gemsets/default.gemsevaluatedtoemptygemlistruby-2.4.0-#generatingdefaultwrappers........ruby-2.4.0-#adjusting#shebangsfor(gemirberbrirdoctestrbrake).Installofruby-2.4.0-#completeRubywasbuiltwithoutdocumentation,tobuilditrun:rvmdocsgenerate-ri[jiaxiaol@usda5p-scop01-admtool~]$[jiaxiaol@usda5p-scop01-admtool~]$rvmlistrvmrubies=*ruby-2.4.0[x86_64]#=>-current#=*-current&&default#*-default[jiaxiaol@usda5p-scop01-admtool~]$
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。