2013-03-12 125 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