1. 程式人生 > 實用技巧 >ruby版本升級(轉帖)

ruby版本升級(轉帖)

參考連線:https://blog.csdn.net/qq_26440803/article/details/82717244

線上安裝ruby

使用yum線上安裝ruby,安裝的版本為2.0.0。

yum install ruby

ruby -v

新增ruby倉庫

新增aliyun映象並檢測Ruby版本

gem sources -a http://mirrors.aliyun.com/rubygems/

ruby -v

安裝RAM

RAM(Ruby Version Manager )是一款RAM的命令列工具,可以使用RAM輕鬆安裝,管理Ruby版本。RVM包含了Ruby的版本管理和Gem庫管理(gemset)

可以使用如下命令進行安裝RAM:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

curl -sSL https://get.rvm.io | bash -s stable

出現如下資訊代表安裝成功:

1 2 3 4 5 6 7 8 9 10 11 12 GPG verified'/home/sidian/.rvm/archives/rvm-1.29.10.tgz' Installing RVM to/home/sidian/.rvm/ Adding rvm PATH line to/home/sidian/.profile/home/sidian/.mkshrc/home/sidian/.bashrc/home/sidian/.zshrc. Adding rvm loading line to/home/sidian/.profile/home/sidian/.bash_profile/home/sidian/.zlogin. Installation of RVM
in/home/sidian/.rvm/isalmost complete: *To start using RVM you need to run `source/home/sidian/.rvm/scripts/rvm` inallyouropenshell windows,inrare cases you need to reopenallshell windows. Thanksforinstalling RVM