LoginSignup
7
7

More than 5 years have passed since last update.

Ubuntu14.04にrbenvを使ってrubyをインストールする

Last updated at Posted at 2014-04-24

rbnevのインストール

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

ruby-buildのインストール

git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

必要パッケージのインストール

sudo apt-get install libssl-dev

rubyのインストールと有効化

rbenv install 2.1.2
rbenv rehash
rbenv gloval 2.1.1

rubyのバージョン確認

rbenv version
ruby -v

以上です。
不足や間違いがありましたら指摘していただけると嬉しいです。

参考
https://github.com/sstephenson/rbenv
http://krakenbeal.blogspot.jp/2012/03/ubunturbenvruby-buildruby.html
https://github.com/sstephenson/ruby-build/issues/526#issuecomment-37933242
http://qiita.com/kazoo04/items/7056704efee66f323ddb

7
7
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
7
7