LoginSignup
10
8

More than 5 years have passed since last update.

rbenvとrubyのインストール方法(メモ)

Last updated at Posted at 2014-07-08

Rubyのビルドに必要なもの

sudo apt-get install git curl g++ zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev libffi-dev bison

rbenvのインストール

git clone git@github.com:rbenv/rbenv .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

ruby-buildのインストール

mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git@github.com:rbenv/ruby-build

rubyのインストール

rbenv install --list
rbenv install 2.3.1

インストールには時間がかかる

rbenv rehash
rbenv global 2.3.1

rubyのインストールを確認

ruby -v
10
8
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
10
8