Skip to content

Instantly share code, notes, and snippets.

@satom9to5
Last active December 30, 2015 06:19
Show Gist options
  • Save satom9to5/7788164 to your computer and use it in GitHub Desktop.
Save satom9to5/7788164 to your computer and use it in GitHub Desktop.
Vagrant設定用メモ

##rbenv

インストール

# cd /usr/local
# git clone git://github.com/sstephenson/rbenv.git rbenv
# vi /etc/profile
export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
$ . /etc/profile

ruby-builderインストール

# mkdir /usr/local/rbenv/plugins
# cd /usr/local/rbenv/plugins
# git clone git://github.com/sstephenson/ruby-build.git
# cd /usr/local/rbenv/plugins/ruby-build
# ./install.sh

インストール可能なRubyのバージョン確認

# rbenv install -l

任意のバージョンのRubyインストール

※バージョン番号-p数字が安定版?

# rbenv install 2.0.0-p353

エラー時の対応

「The Ruby openssl extension was not compiled. Missing the OpenSSL lib?」 -> OpenSSLライブラリが不足しているためインストール

# yum install openssl-devel

通常使うRubyのバージョンを指定

# rbenv rehash
# rbenv global 2.0.0-p353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment