Trying to install gems on Docker and getting Verify return code: 9 (certificate is not yet valid)

tvidldum's Avatar

tvidldum

07 Apr, 2017 02:01 PM

What I'm doing:

wget http://rubygems.org/gems/rubygems-update-2.6.11.gem
gem install --local rubygems-update-2.6.11.gem
gem install rubygems-update
update_rubygems

everything is successful so far

gem --version
2.6.11

Now trying to install rake

gem install rake
ERROR: SSL verification error at depth 0: certificate is not yet valid (9)
ERROR: Certificate /C=US/ST=California/L=San Francisco/O=Fastly, Inc./CN=l.ssl.fastly.net not valid until 2017-03-21T19:04:11Z
ERROR: SSL verification error at depth 0: certificate is not yet valid (9)
ERROR: Certificate /C=US/ST=California/L=San Francisco/O=Fastly, Inc./CN=l.ssl.fastly.net not valid until 2017-03-21T19:04:11Z
ERROR: SSL verification error at depth 0: certificate is not yet valid (9)
ERROR: Certificate /C=US/ST=California/L=San Francisco/O=Fastly, Inc./CN=l.ssl.fastly.net not valid until 2017-03-21T19:04:11Z
ERROR: Could not find a valid gem 'rake' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
ERROR: SSL verification error at depth 0: certificate is not yet valid (9)
ERROR: Certificate /C=US/ST=California/L=San Francisco/O=Fastly, Inc./CN=l.ssl.fastly.net not valid until 2017-03-21T19:04:11Z

-------
Tried to play with different versions 2.6.7 same operation produces "Certificate Expired", 2.6.8 "Not yet valid"

My system:
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

  1. Support Staff 1 Posted by David Radcliffe on 07 Apr, 2017 02:27 PM

    David Radcliffe's Avatar

    I'm guessing you don't have CA certs installed inside docker. (This is a common problem). You'll need to install the ca-certificates package (each OS has a different package name).

  2. David Radcliffe closed this discussion on 07 Apr, 2017 02:27 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac