gpt4 book ai didi

ruby-on-rails - 如何解决捆绑安装 rake 错误和 Gem::RemoteFetcher::FetchError

转载 作者:太空宇宙 更新时间:2023-11-03 17:00:35 25 4
gpt4 key购买 nike

当我在 ruby​​ 2.1.2 上运行 bundle install 时,我得到:

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake-10.4.2.gem)
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.

当我运行 gem install rake 时,我得到:

ERROR:  Could not find a valid gem 'bundle' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

当我运行 which bundle 时,我得到:

/usr/local/rvm/gems/ruby-2.1.2@global/bin/bundle

此错误使我无法在部署前在 localhost:3000 上进行开发工作。

有谁知道如何解决这个问题?

最佳答案

在您的 Rails 应用程序目录中的 Gemfile 中更改:

source 'https://rubygems.org'

source 'http://rubygems.org'

关于ruby-on-rails - 如何解决捆绑安装 rake 错误和 Gem::RemoteFetcher::FetchError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29201748/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com