じっぱひとからげ

十把一絡げになんでもかんでもつづる。

Mac OS X 10.9.4にRubyをインストールしたときのメモ。

Mac OS Xに最新バージョンのRubyをインストールする - 前人未踏の領域へ

こちらを参考にして、同じ手順でやってみた。完全に同じ手順なので書く意味もないけれど、自分の記録用とこの手順通りにできたことを示すためにかいておく。

■Homebrewのインストール

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1

 

Press RETURN to continue or any other key to abort

==> /usr/bin/sudo /bin/mkdir /usr/local

Password:

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local

==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local

==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew

==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew

==> Installing the Command Line Tools (expect a GUI popup):

==> /usr/bin/sudo /usr/bin/xcode-select --install

xcode-select: note: install requested for command line developer tools

Press any key when the installation has completed.

==> Downloading and installing Homebrew...

xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

 

==> Installation successful!

==> Next steps

Run `brew doctor` before you install anything

Run `brew help` to get started

 

$ brew -v

Homebrew 0.9.5

■RVMのインストール

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

 

Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

 

Installing RVM to /Users/watchan/.rvm/

    Adding rvm PATH line to /Users/watchan/.profile /Users/watchan/.bashrc /Users/watchan/.zshrc.

    Adding rvm loading line to /Users/watchan/.bash_profile /Users/watchan/.zlogin.

Installation of RVM in /Users/watchan/.rvm/ is almost complete:

 

  * To start using RVM you need to run `source /Users/watchan/.rvm/scripts/rvm`

    in all your open shell windows, in rare cases you need to reopen all shell windows.

 

# watchan,

#

#   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: http://rvm.io/help and https://twitter.com/rvm_io

 

Rubyのインストール

 

$ rvm list known ruby

 

# 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[-head] # security released on head
[ruby-]1.9.3[-p547]
[ruby-]2.0.0-p451
[ruby-]2.0.0[-p481]
[ruby-]2.1.1

[ruby-]2.1[.2]

[ruby-]2.1-head

ruby-head

 

# GoRuby

goruby

# Topaz

topaz

 

# TheCodeShop - MRI experimental patches

tcs

# jamesgolick - All around gangster
jamesgolick

# Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]

# JRuby
jruby-1.6.8 

jruby[-1.7.13]

jruby-head

# Rubinius
rbx-1.3.3
rbx-2.0.0

rbx-2.1.1
rbx[-2.2.10]
rbx-head

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]

# Kiji

kiji

# 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


# Opal

opal

# IronRuby

ironruby[-1.1.3]

ironruby-head 

$ sudo rvm install ruby-2.1.1 --default

Password:

Unknown ruby string (do not know how to handle): ruby-2.1.1.

Unknown ruby string (do not know how to handle): ruby-2.1.1.

Searching for binary rubies, this might take some time.

Found remote file https://rvm.io/binaries/osx/10.9/x86_64/ruby-2.1.1.tar.bz2

Checking requirements for osx.

Installing requirements for osx.

Updating system....

Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl........

Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.

Requirements installation successful.

ruby-2.1.1 - #configure

ruby-2.1.1 - #download

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 6671k  100 6671k    0     0   393k      0  0:00:16  0:00:16 --:--:--  972k

ruby-2.1.1 - #validate archive

ruby-2.1.1 - #extract

ruby-2.1.1 - #validate binary

ruby-2.1.1 - #setup

ruby-2.1.1 - #gemset created /Users/watchan/.rvm/gems/ruby-2.1.1@global

ruby-2.1.1 - #importing gemset /Users/watchan/.rvm/gemsets/global.gems.........-

ruby-2.1.1 - #generating global wrappers........

ruby-2.1.1 - #gemset created /Users/watchan/.rvm/gems/ruby-2.1.1

ruby-2.1.1 - #importing gemsetfile /Users/watchan/.rvm/gemsets/default.gems evaluated to empty gem list

ruby-2.1.1 - #generating default wrappers........

Updating certificates in '/etc/openssl/cert.pem'.

 

 

 

Rubyのバージョン切り替え

$ ruby -v

ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

 

$ rvm list

 

rvm rubies

 

 * ruby-2.1.1 [ x86_64 ]

 

# => - current

# =* - current && default

#  * - default

 

$ rvm use 2.1.1

Using /Users/watchan/.rvm/gems/ruby-2.1.1

 

$ ruby -v

ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]