36
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacにRubyをインストールする時のメモ

Last updated at Posted at 2013-05-19

MacにRubyをインストールする時のメモ

  • homebrewはあらかじめインストールしておく。
  • インストールにはrbenvを使う。
  • MBA(Mid 2012) + OS X 10.9.3
# rbenv, ruby-buildのインストール
brew install rbenv
brew install ruby-build

# 依存ライブラリのインストール
brew install readline
brew install openssl

# 環境変数の設定
vim ~/.bash_profile #手書き編集
cat ~/.bash_profile
export PATH=~/.rbenv/shims:$PATH
eval "$(rbenv init -)"
source ~/.bash_profile

# Ruby 2.1.2のインストール
RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 2.1.2

# 更新
rbenv rehash

# Ruby 2.1.2を使うとき
# rbenv global 2.1.2
36
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36
35

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?