Help us understand the problem. What is going on with this article?

さくらVPS(CentOS 6)にrbenvでRubyをインストール

More than 5 years have passed since last update.

rbenvのインストール

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

ruby-buildのインストール

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

opensslのインストール

opensslをインストールしていないとrubyインストール時にThe Ruby openssl extension was not compiled. Missing the OpenSSL lib?というエラーメッセージが出る。

$ sudo yum -y install openssl-devel

readlineのインストール

readlineがないとrails cとかpadrino cでエラーを吐く。

$ sudo yum -y install readline-devel

rubyのインストール

# インストールできるバージョンを確認
$ rbenv install --list
  ・・・
  2.0.0-p195
  2.0.0-p247
  2.0.0-p353
  2.0.0-p451
  2.0.0-preview1
  2.0.0-preview2
  2.0.0-rc1
  2.0.0-rc2
  2.1.0
  2.1.0-dev
  2.1.0-preview1
  2.1.0-preview2
  2.1.0-rc1
  2.1.1
  ・・・

# パッチを当てて、インストール
$ rbenv install 2.1.1
$ rbenv rehash

# 使用するrubyのバージョンの設定
$ rbenv global 2.1.1

.zshrcの編集

export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
$ source ~/.zshrc

参照

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした