Unable to download from https://www.rubygems.org ssl error

Following the LAMP stack chef tutorials when I try to a kitchen converge after installing mysql this is what I am getting

    Running handlers:
   [2017-04-14T11:20:39+00:00] ERROR: Running exception handlers
   [2017-04-14T11:20:39+00:00] ERROR: Running exception handlers
   Running handlers complete
   [2017-04-14T11:20:39+00:00] ERROR: Exception handlers complete
   [2017-04-14T11:20:39+00:00] ERROR: Exception handlers complete
   Chef Client failed. 0 resources updated in 14 seconds
   [2017-04-14T11:20:39+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cach
e/chef-stacktrace.out
   [2017-04-14T11:20:39+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cach
e/chef-stacktrace.out
   [2017-04-14T11:20:39+00:00] FATAL: Please provide the contents of the sta
cktrace.out file if you file a bug report
   [2017-04-14T11:20:39+00:00] FATAL: Please provide the contents of the sta
cktrace.out file if you file a bug report
   [2017-04-14T11:20:39+00:00] ERROR: mysql2_chef_gem_mysql2_chef_gem_mysql[
default] (lamp::database line 16) had an error: Mixlib::ShellOut::ShellCommandFa
iled: gem_package[mysql2] (/tmp/kitchen/cache/cookbooks/mysql2_chef_gem/resource
s/mysql2_chef_gem_mysql.rb line 17) had an error: Mixlib::ShellOut::ShellCommand
Failed: Expected process to exit with [0], but received '2'
   ---- Begin output of /opt/chef/embedded/bin/gem install mysql2 -q --no-rd
oc --no-ri -v "0.4.5" --source=https://www.rubygems.org ----
   STDOUT:
   STDERR: ERROR:  SSL verification error at depth 1: unable to get local is
suer certificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  Could not find a valid gem 'mysql2' (= 0.4.5), here is why:
      Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/s
pecs.4.8.gz)
      Unable to download data from https://www.rubygems.org/ - SSL_connect r
eturned=1 errno=0 state=error: certificate verify failed (https://www.rubygems.o
rg/specs.4.8.gz)
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ---- End output of /opt/chef/embedded/bin/gem install mysql2 -q --no-rdoc
 --no-ri -v "0.4.5" --source=https://www.rubygems.org ----
   Ran /opt/chef/embedded/bin/gem install mysql2 -q --no-rdoc --no-ri -v "0.
4.5" --source=https://www.rubygems.org returned 2
   [2017-04-14T11:20:39+00:00] ERROR: mysql2_chef_gem_mysql2_chef_gem_mysql[
default] (lamp::database line 16) had an error: Mixlib::ShellOut::ShellCommandFa
iled: gem_package[mysql2] (/tmp/kitchen/cache/cookbooks/mysql2_chef_gem/resource
s/mysql2_chef_gem_mysql.rb line 17) had an error: Mixlib::ShellOut::ShellCommand
Failed: Expected process to exit with [0], but received '2'
   ---- Begin output of /opt/chef/embedded/bin/gem install mysql2 -q --no-rd
oc --no-ri -v "0.4.5" --source=https://www.rubygems.org ----
   STDOUT:
   STDERR: ERROR:  SSL verification error at depth 1: unable to get local is
suer certificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  Could not find a valid gem 'mysql2' (= 0.4.5), here is why:
      Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/s
pecs.4.8.gz)
      Unable to download data from https://www.rubygems.org/ - SSL_connect r
eturned=1 errno=0 state=error: certificate verify failed (https://www.rubygems.o
rg/specs.4.8.gz)
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ERROR:  SSL verification error at depth 1: unable to get local issuer cer
tificate (20)
   ERROR:  You must add /DC=in/DC=co/DC=persistent/CN=credence to your local
 trusted store
   ---- End output of /opt/chef/embedded/bin/gem install mysql2 -q --no-rdoc
 --no-ri -v "0.4.5" --source=https://www.rubygems.org ----
   Ran /opt/chef/embedded/bin/gem install mysql2 -q --no-rdoc --no-ri -v "0.
4.5" --source=https://www.rubygems.org returned 2
   [2017-04-14T11:20:39+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)
   [2017-04-14T11:20:39+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <default-ubuntu-1404>.  Please see .kitchen/logs/default-ubuntu-1404.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Running windows 7 workstation with the following configuration

Chef Development Kit Version: 1.3.40
chef-client version: 12.19.36
delivery version: master (69bfa4a76959a8d093511a90fddd7a1f7e43e354)
berks version: 5.6.4
kitchen version: 1.16.0

I am facing lots of ssl errors while following tutorials. Is there anyway we can fix this issue permanently.

Have you taken a look at this? http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages

yes I did try this. gem install --local C:\rubygems-update-2.6.10.gem This worked for me . But update_rubygems did not work. Not sure where do we get this on windows or which path should I set

Here is what I get

D:\chef-repo\cookbooks\lamp>update_rubygems
The system cannot find the path specified.

update_rubygems is there in D:\opscode\chefdk\bin in my system and its there is the PATH of my system.

Sorry I am not likely to be of much more help as I don’t use windows. Is it possibly not executable? Does it work if you call it using the full path?

Did this get sorted? I am having the same problem, but I'm wondering if its a VPN error...