Upgrade Ruby installed by RVM

Pocket

It’s easy to upgrade ruby installed by RVM. Only following several steps.

1. Upgrade RVM itself

At first, upgrade RVM to current stable ver.

/Users/yuichi% rvm get stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    431      0 --:--:-- --:--:-- --:--:--  1554
100 10648  100 10648    0     0   4627      0  0:00:02  0:00:02 --:--:-- 47963
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   131  100   131    0     0     96      0  0:00:01  0:00:01 --:--:--   116
100 1488k  100 1488k    0     0   107k      0  0:00:13  0:00:13 --:--:--  116k

Upgrading the RVM installation in /Users/yuichi/.rvm/
    RVM PATH line found in /Users/yuichi/.bashrc.
    RVM sourcing line found in /Users/yuichi/.bash_login /Users/yuichi/.zshrc /Users/yuichi/.zlogin.

Upgrade Notes:

  * RVM comes with set of default gems including 'bundler', 'rake', 'rubygems-bundler' and 'rvm' gems,
    if you do not wish to get this gems install RVM with this flag: --without-gems="rvm rubygems-bundler"
    this option is remembered, it's enough to use it once.

  * If you wish to get more default(global) gems installed, install RVM with this flag: --with-gems="pry vagrant"
    this option is remembered, it's enough to use it once.

  * For first installed ruby RVM will: display rvm requirements, set it as default and use it.
    To avoid this behavior either use full path to rvm binary or prefix it with `command `.

  * Binary rubies are installed by default if available, you can read about it in help:
      rvm help install
      rvm help mount

  * The default umask for multi-user installation got extended to `umask u=rwx,g=rwx,o=rx`,
    comment it out to avoid automatic updates.


# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Upgrade of RVM in /Users/yuichi/.rvm/ is complete.

# Yuichi Minowa(@y_minowa),
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and
#   more enjoyable!!!
#
# ~Wayne

RVM reloaded!

2. Choose Ruby trying to upgrade and execure upgrade

Following command shows Rubies you installed.

/home/yuichi% rvm list

rvm rubies

   ruby-1.8.7-p371 [ i686 ]
   ruby-1.9.2-p320 [ i686 ]
=* ruby-1.9.3-p286 [ i686 ]

# => - current
# =* - current && default
#  * - default

Choose the ruby to upgrade and execute “rvm upgrade” command.

/home/yuichi% rvm upgrade 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p286 to ruby-1.9.3-p374? (Y/n): Y
Installing new ruby ruby-1.9.3-p374
Searching for binary rubies, this might take some time.
ruby-1.9.3-p374 - #configure
ruby-1.9.3-p374 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.6M  100 11.6M    0     0  68325      0  0:02:58  0:02:58 --:--:-- 74398
ruby-1.9.3-p374 - #validate archive
ruby-1.9.3-p374 - #extract
ruby-1.9.3-p374 - #validate binary
ruby-1.9.3-p374 - #setup
Saving wrappers to '/home/yuichi/.rvm/bin'.
ruby-1.9.3-p374 - #importing default gemsets, this may take time ...
Migrating gems from ruby-1.9.3-p286 to ruby-1.9.3-p374
Are you sure you wish to MOVE gems from ruby-1.9.3-p286 to ruby-1.9.3-p374?
This will overwrite existing gems in ruby-1.9.3-p374 and remove them from ruby-1.9.3-p286 (Y/n): Y
Moving gemsets...
Moving ruby-1.9.3-p286 to ruby-1.9.3-p374
Making gemset ruby-1.9.3-p374 pristine.
Error running '' under ,
please read /home/yuichi/.rvm/log//gemset.pristine.log
Moving ruby-1.9.3-p286@global to ruby-1.9.3-p374@global
Making gemset ruby-1.9.3-p374@global pristine.
Moving ruby-1.9.3-p286@rails3.2 to ruby-1.9.3-p374@rails3.2
Making gemset ruby-1.9.3-p374@rails3.2 pristine.
Error running '' under ,
please read /home/yuichi/.rvm/log//gemset.pristine.log
Do you wish to move over aliases? (Y/n): Y
Updating alias default to point to ruby-1.9.3-p374
Do you wish to move over wrappers? (Y/n): Y
Do you also wish to completely remove ruby-1.9.3-p286 (inc. archive)? (Y/n): Y
Removing ruby-1.9.3-p286
Successfully migrated ruby-1.9.3-p286 to ruby-1.9.3-p374
Upgrade complete!

投稿者紹介

株式会社ユニキャスト
私たちは、テクノロジに魅せられた個性あふれるメンバーによって構成された茨城県日立市に本社を構えるベンチャー企業です。
”テクノロジを通して「驚き」と「感動」を創造し、人々の「夢」と「笑顔」を支えます。” の経営理念をモットーに明るい未来を描き、ワクワクする企画提案を続けて参ります。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください