RVM Ruby 安裝
# 先查詢可安裝的Ruby列表
- rvm list known
- rvm install 2.1.4 //會跳出詢問要輸入 ubuntu password
Updating system..ubuntu password required for 'apt-get --quiet --yes update':
在這時後,輸入ubuntu的密碼後按下Enter就會開始安裝Ruby
#安裝 第二套 ruby
- rvm install 2.0.0-p643
#查詢安裝狀態
- rvm list
ubuntu@ubuntu:~$ rvm list
rvm rubies
=> ruby-2.0.0-p643 [ x86_64 ]
* ruby-2.1.4 [ x86_64 ]
# => - current
# =* - current && default
# * - default
# 切換使用版本
- rvm use 2.1.4 //current 會切換成 2.1.4
# 設定預設版本
- rvm 2.1.4 --default
# 查詢目前機器Ruby資訊
- rvm info
#如果想切回原本系統上的 Ruby (已經使用了rvm 這個除非有特殊需求,不然就少用吧)
- rvm system
============== rvm list known 輸出結果 ================================
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p643]
[ruby-]2.1.4
[ruby-]2.1[.5]
[ruby-]2.2[.1]
[ruby-]2.2-head
ruby-head
# for forks use: rvm install ruby-head-
# JRuby
jruby-1.6.8
jruby[-1.7.19]
jruby-head
jruby-9.0.0.0.pre1
# Rubinius
rbx-1.4.3
rbx-2.4.1
rbx[-2.5.2]
rbx-head
# Opal
opal
# Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]
# GoRuby
goruby
# Topaz
topaz
# MagLev
maglev[-head]
maglev-1.0.0
# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head
# IronRuby
ironruby[-1.1.3]
ironruby-head
============== rvm list known 輸出結果 ================================
參考:
沒有留言:
張貼留言