我在安装Rails 4时遇到了问题,希望你能帮助我!
演示
$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
演示
$ sudo gem install rails
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
发布于 2013-10-06 06:14:33
安装Rails的最佳解决方案是使用Ruby版本管理器(Ruby RVM)
使用此命令rvm install 2.0.0
运行curl -L https://get.rvm.io | bash -s stable
来安装RVM和install Ruby RVM,然后使用此命令安装Rails
gem install rails -v 4.0.0
那你就可以走了。
发布于 2013-10-06 07:38:10
有相同的问题,所有内容都在这里描述:http://railsapps.github.io/openssl-certificate-verify-failed.html
tl;dr最新版本的RVM,即Ruby版本管理器,包括一个实用程序,用于诊断和解决由过期的证书文件引起的错误。有关说明和建议,请参阅安装Rails一文。RVM网站解释了如何安装RVM。
如果你已经安装了RVM,试试这个:
$ rvm -v
# rvm 1.19.1 (stable)
$ rvm osx-ssl-certs status all
# Certificates for...
$ rvm osx-ssl-certs update all
# Updating certificates...
如果您使用的是RVM (您必须使用RVM版本1.19.1或更高版本),那么这就是解决问题所需的全部内容。
https://stackoverflow.com/questions/19205939
复制相似问题