yuyunko's blog

ぼうびろく

rbenvインストール方法ぼうびろく

rbenvのインストール方法

$ brew install rbenv
$ brew install ruby-build
$ brew install readline
$ brew install openssl
$ brew link readline
$ brew link openssl
$ CONFIGURE_OPTS="--with-readline-dir=/usr/local --with-openssl-dir=/usr/local" rbenv install 1.9.3-p194
$ rbenv global 1.9.3-p194
$ rbenv rehash

また、以下を.zshrcに記述しておく。

# rbenv
if which rbenv > /dev/null; then
    eval "$(rbenv init -)"
    if [ -d "${HOME}/.rbenv/completions" ]; then
        source ~/.rbenv/completions/rbenv.zsh
    fi
    # http://d.hatena.ne.jp/clmind/20111109/1320814435
    alias gem='rbenv exec gem'
fi