906 906 - 1 year ago 739
Ruby Question

ERROR: While executing gem ... (OpenSSL::X509::StoreError)

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:
- 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
- ruby
- x86-mingw32

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


Answer Source

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/.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download