Rails 5 - 如何解决OpenSSL :: X509 :: StoreError:系统库问题?

时间:2018-06-11 07:26:42

标签: ruby-on-rails openssl certificate ssl-certificate rvm

在尝试创建新的rails 5项目时,我收到类似

的错误
OpenSSL::X509::StoreError: system lib
...
...

### Gemfile.lock

```
<No /home/shruthi/Projects/VSupport/Gemfile.lock found>
```

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=system+lib&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new
     run  bundle exec spring binstub --all
* bin/rake: spring inserted
* bin/rails: spring inserted

我的rvm列表就像

    ruby-2.3.1 [ x86_64 ]
 =* ruby-2.5.1 [ x86_64 ]

尝试按ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'解析时,输出就像/usr/lib/ssl/cert.pem

我系统的证书文件(名称)为Fortinet_CA_SSL.crtFortinet_CA_SSLProxy.crt

如何解决此证书错误?

1 个答案:

答案 0 :(得分:1)

BUNDLE_SSL_CA_CERT: "/usr/local/share/ca-certificates/Fortinet/Fortinet_CA_SSLProxy.crt"文件中添加{{1}}并重新启动系统。

有关详细信息,请参阅here