ruby管理ツールrvm

3533 ワード

rvmのインストール
公式サイト(https://www.rvm.io/)は、次の2つのコマンドを実行するだけでインストールできることを示します.
# gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# \curl -sSL https://get.rvm.io | bash -s stable

以上の2つのコマンドを実行すると、次のプロンプトが表示されます.
  * First you need to add all users that will be using rvm to 'rvm' group,
    and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

  * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# Administrator,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: https://rvm.io/help and https://twitter.com/rvm_io

上記のプロンプトに従って、次のコマンドを実行します.
# source /etc/profile.d/rvm.sh

検証:
# rvm -v
rvm 1.27.0 (latest) by Wayne E. Seguin @gmail.com>, Michal Papis @gmail.com> [https://rvm.io/]

rvmインストールruby
rubyセットの表示:
# rvm list known  

選択したrubyバージョンをインストールします.
# rvm install ruby-2.3

以上のコマンドにより、gemもインストールされます.選択したrubyバージョンを使用するには、次の手順に従います.
# rvm use ruby-2.3

デフォルトrubyバージョンに設定:
# rvm use ruby-2.3 --default

検証:
# ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]