访问被拒绝,你可能没有权限或未登录。

Ruby 执行 bundle install 报错提示 SSL 过期

20121205_star · 2025年08月28日 · 最后由 hellorails 回复于 2025年08月29日 · 83 次阅读

各位道友,是否遇到过此问题,可否帮忙看看? 开发环境: Ubuntu 24.04 Ruby 3.0.4 OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) 搞过:export SSL_CERT_FILE=/path/to/cacert.pem(无效)

执行:bundle install 提示: Fetching source index from https://gems.ruby-china.com/

Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.ruby-china.com/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.

Could not verify the SSL certificate for https://gems.ruby-china.com/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see https://railsapps.github.io/openssl-certificate-verify-failed.html. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.

并没有提示过期啊,它大概是系统里不认 WoTrus 的证书

hellorails 回复

咋解决呢?不太懂

需要 登录 后方可回复, 如果你还没有账号请 注册新账号