CentOS 5.7 に rvm をインストール


rvm のサイトにある通りにインストールスクリプトを叩いたらエラー。

 [ysato@localhost ~]$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)Downloading RVM from wayneeseguin branch stable

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Could not download 'https://github.com/wayneeseguin/rvm/tarball/stable'.
  Make sure your certificates are up to date as described above.
  To continue in insecure mode run 'echo insecure >> ~/.curlrc'.

エラーメッセージでぐぐると CentOS 5.5 に rvm で ruby をインストールする が見つかる。が、スクリプトを編集して証明書の警告を無視するオプションを追加、はあまりやりたくなかったので、別の方法を。

Curl Certificate Error when Using RVM to install Ruby 1.9.2 - Stack Overflow の 8 にある通りに .pem ファイルをダウンロードして、環境変数 CURL_CA_BUNDLE にセット。

#to download the cert
wget http://curl.haxx.se/ca/cacert.pem
#to let curl use it for the next calls
export CURL_CA_BUNDLE=~/cacert.pem


[ysato@localhost ~]$ bash -s stable < <(curl -s -k https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  796k  100  796k    0     0   199k      0  0:00:03  0:00:03 --:--:--  417k

Installing RVM to /home/ysato/.rvm/
installing - /home/ysato/.rvm/man/man1/rvm.1.gz -
installing - /home/ysato/.rvm/man/man1/rvm.1 -

# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.beginrescueend.com/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Installation of RVM in /home/ysato/.rvm/ is almost complete:

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

# ysato,
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
# ~Wayne


プログラミング言語 Ruby