LoginSignup
23
22

More than 5 years have passed since last update.

RVMによるrubyのインストール、vagrantのCentOS環境で。

Last updated at Posted at 2014-11-01

最初に、

curl -L https://get.rvm.io | bash -s

を実行すると途中で以下のようなメッセージが出るので、

  * To start using RVM you need to run `source /home/vagrant/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

実行する。

source /home/vagrant/.rvm/scripts/rvm

次に以下を実行。

rvm get stable

以下のようなエラーが出るので、

gpg: 署名を検査できません: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/home/vagrant/.rvm/archives/rvm-installer' - 'https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer.asc'!
try downloading the signatures:

    gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

以下を実行する。

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

もう一回。

rvm get stable

次に以下を実行。

rvm requirements

以下の様なエラーが出るので、

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

以下のファイルを編集する。

sudo vim /etc/yum.repos.d/epel.repo

コメントアウトされてる部分を取り替える。

#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

もう一回。

rvm requirements

最後にrubyのインストール。

rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/usr

成功した。

ruby -v
ruby 2.0.0p594 (2014-10-27 revision 48167) [x86_64-linux]
23
22
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
23
22