Tag: rbenv
$ cd $ git clone git://github.com/sstephenson/rbenv.git .rbenv
export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update
$ cd ~/.rbenv $ git pull $ cd ~/.rbenv/plugins/ruby-build $ git pull
rbenv install --list
rbenv versions
$ sudo port install openssl $ sudo port install readline $ RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local --with-readline-dir=/opt/local" rbenv install 1.9.3-p429 $ sudo rbenv rehash
$ brew install openssl $ brew install readline $ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 1.9.3-p429 $ rbenv rehash
rbenv uninstall 1.9.3-p392
rbenv global
rbenv global 1.9.3-p392
rbenv global <バージョン> | デフォルトで使うRubyの切り替え |
rbenv local <バージョン> | 特定ディレクトリ以下のrubyのバージョン指定となる |
rbenv shell <バージョン> | 一時的に切り替えたいとき |
shell > local > globalの順に優先される。
gem install passenger
passenger-install-apache2-module
export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:${PATH}"
RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install --patch 2.1.1 < <(curl -sSL 'https://projects.archlinux.org/svntogit/packages.git/plain/ruby/trunk/0001-Fix-undeclared-identifier-error-by-using-the-actual-.patch?id=d54cc2645013754f6a303075eb22df1eecb7676a')