Thought about system by Hiroyasu Ishikawa

We are uncovering better ways of developing system.

Ruby 2.1.2 install on Ubuntu Linux

Ruby関連の環境が全くない(というよりほぼまっさらのUbuntu Linux)にRuby 2.1.2をインストールするまでのメモ

インストールの環境作り

gitのインストール
sudo aptitude install git

gccのインストール
sudo aptitude install gcc

libssl-devのインストール*1
sudo aptitude install libssl-dev

rbenvのインストール

以下のページを参照してgithubからインストールする、gitが入っていなければaptでも使ってインストールしておく
https://github.com/sstephenson/rbenv

また上記ページに記載されている通りruby-buildもインストールする
https://github.com/sstephenson/ruby-build#readme

rubyのインストール

rbenvを使ってインストールする
rbenv install 2.1.2

*1:"The Ruby openssl extension was not compiled. Missing the OpenSSL lib?"って怒られたので