2013-03-12 313 views
0
Jason-Kim-MacBook-Pro:composer jkim$ bundle install 
Fetching gem metadata from https://rubygems.org/......... 
Fetching gem metadata from https://rubygems.org/. 
Fetching source index from https://rubygems.org/ 
Resolving dependencies... 

Bundler::Fetcher::CertificateFailureError: Could not verify the SSL certificate for https://rubygems.org/. 
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ssl-certs. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'. 
An error occurred while installing rake (10.0.3), and Bundler cannot continue. 
Make sure that `gem install rake -v '10.0.3'` succeeds before bundling. 

我的gemfile包含gem "mysql2"试图安装mysql2 gem,在安装Bundle时发现CertificateFailureError

我是OS X Lion,并使用Ruby 1.8.7。 Rails是3.2.12。

我安装了耙btw。

Jason-Kim-MacBook-Pro:composer jkim$ gem install rake -v '10.0.3' 
Successfully installed rake-10.0.3 
1 gem installed 
Installing ri documentation for rake-10.0.3... 
Installing RDoc documentation for rake-10.0.3... 
+0

对于它的价值,我就遇到了这个确切的错误。只需重新运行该命令就可以修复它。不需要编辑所需的gem文件。 https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/6.1-to-6.2.md – spuder 2013-10-22 05:50:49

回答

1

仍然不知道到底是什么问题,但我通过不使用https修复了它。

在你的Gemfile,改变源source 'http://rubygems.org'

+2

我不会称之为“修复”,而是“解决”。 :) – 2013-12-05 19:25:31