3

I tried to install serialport into Windows 7 as administrator however, I am facing below error:

C:\Sites>gem install serialport
ERROR: While executing gem ... (OpenSSL::X509::StoreError)

I've tried the following, but they have not helped:

I have tried to find those solution from online. However, it still cant work. Any ideas?

Below are gem environment for my PC:

C:\Sites>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby2.1.0/bin
  - SPEC CACHE DIRECTORY: C:/Users/5004118294/.gem/specs
  - RUBYGEMS PLATFORMS:
  - ruby
  - x86-mingw32

C:\Sites>gem which openssl
openssl Directory: C:\RailsInstaller\Ruby2.1.0\ruby\2.1.0\openssl.rb

Thanks

Community
  • 1
  • 1
906
  • 45
  • 1
  • 5

3 Answers3

1

TRy this in your command line

ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'

Also see OpenSSL::X509::StoreError: cert already in hash table? and SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/.

Community
  • 1
  • 1
Nitin Rajan
  • 309
  • 2
  • 18
  • Thanks for your quick reply. I have tried this solution before. However, It cannot work in my environment. 'C:\Sites>ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE' C:/Users/Luis/Code/luislavena/knap-build/var/knapsack/software/x86-windows/opens sl/1.0.0o/ssl/cert.pem' Thanks – 906 Jun 02 '15 at 10:15
  • check here http://stackoverflow.com/questions/19150017/ssl-error-when-installing-rubygems-unable-to-pull-data-from-https-rubygems-o – Nitin Rajan Jun 02 '15 at 10:28
  • Hi @Nitin Rajan. It works now when I update the gem to 2.4.5. Thanks a lot... ^^ – 906 Jun 03 '15 at 01:18
1

May be the "SSL_CERT_FILE" environment variable is wrong. Just delete the variable and try.

Maheshkumar
  • 724
  • 1
  • 10
  • 19
0

TO fix this error I just added the SSL_CERT_FILE variable in my System Environment. Type

sysdm.cpl

at your command prompt to get to the system Environment.

In the User variables SET the SSL directory and file location to a known ssl certificate directory. I set mine to Git bash

SSL_CERT_DIR = C:\Program Files\Git\mingw64\ssl\certs

SSL_CERT_FILE = C:\Program Files\Git\mingw64\ssl\cert.pementer image description here

You can use this awesome tool here to check if you can make a connection on https. https://github.com/mislav/ssl-tools

pensebien
  • 506
  • 4
  • 16