8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSにRubyインストール

Last updated at Posted at 2016-02-21

CentOSにRubyをインストールした時のメモです。

環境

MacOSX
Vagrant
CentOS 7.1

インストール

rbenvインストール

複数のRubyを管理できる、 ruby-buildというプラグインでrubyをインストールできる。
https://github.com/rbenv/rbenv

$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ cd ~/.rbenv && src/configure && make -C src
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ ~/.rbenv/bin/rbenv init
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile 
$ source ~/.bash_profile

ruby-buildインストール
https://github.com/rbenv/ruby-build

$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ rbenv install -l
Available versions:
  1.8.6-p383
  1.8.6-p420
  .
  .
  .
   ree-1.8.7-2012.02
  topaz-dev

$ gem install bundler

現時点で最新の安定版2.3.0をインストール

$ rbenv install 2.3.0
$ rbenv global 2.3.0
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

参考)
https://www.ruby-lang.org/ja/documentation/

8
8
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?