嗯,我運行了gem update --sytem
,現在我似乎被洗腦了。Windows 7上的RubyGems 2.5.0 SSL_connect證書驗證失敗
我想運行一個本地Jekyll博客(檢查我的東西,我把它推到github)。
jekyll serve
給我:
c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in `connect': (Bundler::Dsl::DSLError)
[!] There was an error parsing `Gemfile`: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certific
ate verify failed. Bundler cannot continue.
# from C:/Users/j6l/Documents/GitHubPages/johnl4.github.io/Gemfile:5
# -------------------------------------------
# gem 'github-pages', versions['github-pages']
> gem 'jekyll-feed'
# source 'https://rubygems.org'
# -------------------------------------------
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in `block in connect'
from c:/Ruby22-x64/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923:in `connect'
from c:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
和一些堆棧跟蹤條目,但我認爲這是不夠的。
bundle update
也是這麼想的。
我是不是一位Ruby專家(也不是Jekyll的那個),我只想讓我的博客在那裏。
我已經看過Luis Lavena關於RubyGems舊版本的帖子,他沒有提及2.5.0,這是品牌spankin的新(只是我的運氣,呃?)。無論如何,我的ssl certs目錄中的cert.pem文件與人們說要下載的文件完全一致,所以我不確定這是什麼問題,除非我查找錯誤的目錄或其他東西。
PS C:\Ruby22-x64\lib\ruby\site_ruby\2.2.0\rubygems\ssl_certs> diff -ref $(get-content .\AddTrustExternalCARoot-2048.pem) -dif $(get-content C:\Users\j6l\Downloads\AddTrustExternalCARoot-2048.pem)
PS C:\Ruby22-x64\lib\ruby\site_ruby\2.2.0\rubygems\ssl_certs>
PS C:\Users\j6l\Documents\GitHubPages\johnl4.github.io> gem update --system
Latest version currently installed. Aborting.
PS C:\Users\j6l\Documents\GitHubPages\johnl4.github.io> ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]
PS C:\Users\j6l\Documents\GitHubPages\johnl4.github.io> gem --version
2.5.0
PS C:\Users\j6l\Documents\GitHubPages\johnl4.github.io> bundle --version
Bundler version 1.10.6
現在是什麼?
(感謝。:))
我寧願讓這個評論,而不是一個答案,因爲沒有足夠的信息給出的問題確定https之外可能存在的問題。但是,SO不允許我發表評論。因此,答案。如果你沒有捲曲你的窗口框,那麼你可以在這裏得到它:http://curl.haxx.se/download.html [活躍於2015-11-04] – madmax
有趣。 PowerShell(3.0)爲Invoke-WebRequest提供了一個內置的curl別名,它在運行時爲我提供了與您發佈的內容相同的內容。運行指向的curl.exe(純64位,帶有SSL)會導致證書失敗,「無法獲得本地頒發者證書」。當我指定'--cacert。\ AddTrustExternalCARoot-2048.pem'時,它可以工作(並給出類似於你的結果),但是如果指定--capath $(pwd),它將再次失敗。 – JohnL4
關於這種情況的博客文章提到通過吹走寶石源緩存,下載最新版本的rubygems for windows並重新安裝來解決此問題的可能性。你嘗試過嗎? – madmax