Thursday, December 18, 2014

[Jekyll] Ruby gem install jekyll certificate verify failed

That moment when gem install failed...

C:\>gem install jekyll
ERROR:  Could not find a valid gem 'jekyll' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/latest_specs.4.8.gz)

All you have to do is...

https://gist.github.com/luislavena/f064211759ee0f806c88

 In short

  1. Download AddTrustExternalCARoot-2048.pem
  2. Save to C:\Ruby21-x64\lib\ruby\2.1.0\rubygems\ssl_certs
  3. Try gem install jekyll again, should work now.

And yes your path is not same as mine just find it or use...

gem which rubygems

via command line and here we go to next error LOL

ERROR: Error installing jekyll: The 'yajl-ruby' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

Just follow this...

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

 In short

  1. Go to : http://rubyinstaller.org/downloads/
  2. Download : DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
  3. Extract to : C:\DevKit
  4. via command line : cd C:\DevKit
  5. via command line : ruby dk.rb init
  6. add - C:/Ruby21-x64 to config.yml
  7. via command line : ruby dk.rb install

It will look like this...

But when you follow... 

http://jekyllrb.com/docs/usage/ 

And try to build you will get...

You can choose to install python like this...

http://yizeng.me/2013/05/10/setup-jekyll-on-windows/

Or just disable that highlighter in _config.yml like this

Post a Comment