LoginSignup
6
7

More than 5 years have passed since last update.

Ubuntu14.04にrbenvでRuby2.2.2をインストール

Last updated at Posted at 2015-06-23

Ubuntu14.04にrbenvからRuby2.2.2をインストールした際の作業メモです。

#これやらないとruby-buildのインストールに失敗する
$sudo apt-get update                  
#rbenvとgit、OpenSSLをインストール
$sudo apt-get install -y git rbenv libssl-dev    

# .bashrcに以下を追記してrbenvのパスを通す
$vi .bashrc                           
# export PATH="$HOME/.rbenv/bin:$PATH"
# eval "$(rbenv init -)"
$source .bashrc                       

#ruby-buildリポジトリを取得し、.rbenv/plugins配下に展開
$git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build    
#rbenvでruby2.2.2をインストール
$rbenv install 2.2.2                  
#rubyバージョン2.2.2を使用
$rbenv global 2.2.2                   
#2.2.2と出力されれば成功
$ruby -v                 

参考) http://qiita.com/kazoo04/items/7056704efee66f323ddb

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