Gem network error while fetching

Describe the problem as clearly as you can Anytime I run bundle update for my project (originally a jekyll site, but it also happens with any Gemfile as far as I can tell) I get a strange HTTP erro...

Describe the problem as clearly as you can

Anytime I run bundle update for my project (originally a jekyll site, but it also happens with any Gemfile as far as I can tell) I get a strange HTTP error «Network error while fetching https://… (execution expired)». I’ve put the errors below, and all of the URLs that were logged I can curl or download with my browser with no problem. Also note that plugging e.g. the gemspec url into irb as Net::HTTP.get(URI('uri')) works fine as well.

Errors/Backtraces

Running `bundle install --verbose` with bundler 2.2.16
Found changes from the lockfile, re-resolving dependencies because the list of sources changed, the dependencies in your gemfile changed, you added a new platform to your gemfile
HTTP GET https://index.rubygems.org/versions
Net::OpenTimeout: execution expired
/usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
  /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
  /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
  /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
  /usr/lib/ruby/3.0.0/net/http.rb:965:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:657:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:597:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendored_persistent.rb:16:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:870:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:59:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:17:in `fetch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:131:in `call'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client/updater.rb:48:in `block in update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/tmpdir/lib/tmpdir.rb:96:in `mktmpdir'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client/updater.rb:29:in `update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client.rb:98:in `update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client.rb:85:in `update_and_parse_checksums!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:75:in `available?'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:16:in `call'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:16:in `block in compact_index_request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher.rb:161:in `use_api'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `block in api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `select'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:407:in `block in remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:406:in `remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:104:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:293:in `block (2 levels) in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `block in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:288:in `index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:908:in `source_requirements'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:282:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:185:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:173:in `resolve_remotely!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:291:in `resolve_if_needed'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:83:in `block in run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:15:in `lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:72:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:24:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/install.rb:64:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:259:in `block in install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/settings.rb:114:in `temporary'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:258:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
  /usr/bin/bundle:23:in `load'
  /usr/bin/bundle:23:in `<main>'
Bundler::HTTPError: Network error while fetching https://index.rubygems.org/versions (execution expired)
/usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:72:in `rescue in request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:49:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:17:in `fetch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:131:in `call'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client/updater.rb:48:in `block in update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/tmpdir/lib/tmpdir.rb:96:in `mktmpdir'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client/updater.rb:29:in `update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client.rb:98:in `update'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/compact_index_client.rb:85:in `update_and_parse_checksums!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:75:in `available?'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:16:in `call'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/compact_index.rb:16:in `block in compact_index_request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher.rb:161:in `use_api'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `block in api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `select'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:407:in `block in remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:406:in `remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:104:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:293:in `block (2 levels) in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `block in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:288:in `index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:908:in `source_requirements'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:282:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:185:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:173:in `resolve_remotely!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:291:in `resolve_if_needed'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:83:in `block in run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:15:in `lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:72:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:24:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/install.rb:64:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:259:in `block in install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/settings.rb:114:in `temporary'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:258:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
  /usr/bin/bundle:23:in `load'
  /usr/bin/bundle:23:in `<main>'
HTTP GET https://index.rubygems.org/api/v1/dependencies
Net::OpenTimeout: execution expired
/usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
  /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
  /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
  /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
  /usr/lib/ruby/3.0.0/net/http.rb:965:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:657:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:597:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendored_persistent.rb:16:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:870:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:59:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:17:in `fetch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/dependency.rb:10:in `available?'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher.rb:161:in `use_api'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `block in api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `select'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:402:in `api_fetchers'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:407:in `block in remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:406:in `remote_specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/source/rubygems.rb:104:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:293:in `block (2 levels) in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:291:in `block in index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/index.rb:9:in `build'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:288:in `index'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:908:in `source_requirements'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:282:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:185:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:173:in `resolve_remotely!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:291:in `resolve_if_needed'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:83:in `block in run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:15:in `lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:72:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:24:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/install.rb:64:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:259:in `block in install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/settings.rb:114:in `temporary'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:258:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
  /usr/bin/bundle:23:in `load'
  /usr/bin/bundle:23:in `<main>'
Fetching source index from https://rubygems.org/
Need to query more than 500 gems. Downloading full index instead...
HTTP GET https://rubygems.org/quick/Marshal.4.8/minima-2.5.0.gemspec.rz
Net::OpenTimeout: execution expired
/usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
  /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
  /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
  /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
  /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
  /usr/lib/ruby/3.0.0/net/http.rb:965:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:657:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:597:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendored_persistent.rb:16:in `connection_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:870:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:59:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:17:in `fetch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher.rb:107:in `fetch_spec'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:101:in `_remote_specification'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:107:in `method_missing'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:78:in `dependencies'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:102:in `same_deps'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `block in select_best_platform_match'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `take_while'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `select_best_platform_match'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:160:in `block (2 levels) in search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver/spec_group.rb:10:in `create_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:168:in `block in search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `reduce'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:309:in `block in verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:306:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:306:in `verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:58:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:23:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:282:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:185:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:173:in `resolve_remotely!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:291:in `resolve_if_needed'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:83:in `block in run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:15:in `lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:72:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:24:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/install.rb:64:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:259:in `block in install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/settings.rb:114:in `temporary'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:258:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
  /usr/bin/bundle:23:in `load'
  /usr/bin/bundle:23:in `<main>'
Network error while fetching https://rubygems.org/quick/Marshal.4.8/minima-2.5.0.gemspec.rz (execution expired)
Bundler::HTTPError: Network error while fetching https://rubygems.org/quick/Marshal.4.8/minima-2.5.0.gemspec.rz (execution expired)
/usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:72:in `rescue in request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:49:in `request'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher/downloader.rb:17:in `fetch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/fetcher.rb:107:in `fetch_spec'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:101:in `_remote_specification'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:107:in `method_missing'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/remote_specification.rb:78:in `dependencies'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:102:in `same_deps'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `block in select_best_platform_match'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `take_while'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/gem_helpers.rb:51:in `select_best_platform_match'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:160:in `block (2 levels) in search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver/spec_group.rb:10:in `create_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:168:in `block in search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `reduce'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:156:in `search_for'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:309:in `block in verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:306:in `each'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:306:in `verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:58:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/resolver.rb:23:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:282:in `resolve'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:185:in `specs'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/definition.rb:173:in `resolve_remotely!'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:291:in `resolve_if_needed'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:83:in `block in run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:19:in `rescue in lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/process_lock.rb:15:in `lock'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:72:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/installer.rb:24:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/install.rb:64:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:259:in `block in install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/settings.rb:114:in `temporary'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:258:in `install'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
  /usr/bin/bundle:23:in `load'
  /usr/bin/bundle:23:in `<main>'

Post steps to reproduce the problem

I couldn’t reproduce this in a docker container, so I think it is something with my environment. However, I really don’t do much with ruby, and I’ve tried uninstalling and reinstalling multiple times to no avail. I have ruby and bundler installed from the arch linux package repositories, and the error still happens if I install bundler with gem install.

Environment

Bundler       2.2.16
  Platforms   ruby, x86_64-linux
Ruby          3.0.1p64 (2021-04-05 revision 0fb782ee38ea37fd5fe8b1f775f8ad866a82a3f0) [x86_64-linux]
  Full Path   /usr/bin/ruby
  Config Dir  /etc
RubyGems      3.2.15
  Gem Home    /usr/lib/ruby/gems/3.0.0
  Gem Path    /home/coolreader18/.local/share/gem/ruby/3.0.0:/usr/lib/ruby/gems/3.0.0
  User Home   /home/coolreader18
  User Path   /home/coolreader18/.local/share/gem/ruby/3.0.0
  Bin Dir     /usr/bin
Tools         
  Git         2.31.1
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Bundler Build Metadata

Built At          2021-04-09
Git SHA           3d7bfaff25
Released Version  true

Gemfile

Gemfile

source 'https://rubygems.org'
gem 'kramdown'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:

PLATFORMS
  x86_64-linux

DEPENDENCIES

BUNDLED WITH
   2.2.16

Содержание

  1. Network error while fetching http://rubygems/quick/Marshal.4.8/typhoeus-0.5.4.gemspec.rz #2379
  2. Comments
  3. Footer
  4. Network error while fetching — 0.11.0 #15
  5. Comments

Network error while fetching http://rubygems/quick/Marshal.4.8/typhoeus-0.5.4.gemspec.rz #2379

It seems like the code to construct the Rubygems URL somewhere is broken. The URL should be http://rubygems.org/quick/Marshal.4.8/typhoeus-0.5.4.gemspec.rz.

I am running Bundler version 1.2.1

The text was updated successfully, but these errors were encountered:

Could you supply the rest of the information in ISSUES please? Thanks!

@indirect I was thinking of adding a issue command to CLI that generates the information you need and stores it in a temporary markdown file that users can use to create gist & report issues with. Has anyone attempted/suggested that? One problem that I see is that it is tight coupling to ISSUES but it would make reporting easier.

The bundle env command already does that, I believe.

hi their i’ve the same issue
and i was start learning rails on windows and it was hard so i used ubuntu and it is hard
how come

Hi @als7ly, I think learning Rails is probably hard because it includes many different technologies, including (at minimum) databases, programming, networking, markup, and styling. As for the network error, it seems that your computer is having trouble talking to the server at rubygems.org for some reason. If the rubygems.org server is up (you can check at status.rubygems.org), then the problem is probably either in your network connection or in your computer. I hope that helps.

@tundal45 source ‘http://rubygems’ is your local rubygems server or just mistake?

@simi local server although that’s probably why I saw the error because I was not in that local network. Thanks!

I hope this helps:
after installing ruby/rails type:

rails new demo
if you have network problem the execution stops on bundle installation. then interrupt the execution.
^c
cd demo
demo> vi Gemfile
#change https into http in the beginning of the Gemfile
demo> bundle install

after you get an error, again » > bundle install » and again and again .
just keep doing this. there is I think a network heavy load preventing ruby from responding properly. each time you run bundle install, some gems will be installed until you completely succeed.
Regards

I too was getting the same error. It turns out that source ‘https://rubygems.org’ works like a charm!

Weird. Trying source ‘https://rubygems.org indeed worked for me too.

@skottler @evanphx looks like the load balancer is having trouble redirecting to https, maybe? ↑

Just installed ruby 2.1.2 using RVM, then installed rails and when it tried to bundle install I got this Network error. Then edited the source to use http instead of https and it did the trick.

Could this be an openssl issue?

@jplaza it could be. Do you get more information when you run with —verbose ?

Same result using verbose:

the same for me

Downgraded to 1.6.3 and it’s working

As reported on Twitter1, this issue is resolved by downgrading to 1.6.3. This appears to be a regression. 🙁

On Jul 21, 2014, at 6:50 AM, Serg Podtynnyi notifications@github.com wrote:

/projects/ZZZ/XXX ‹ruby-2.1.2› ‹master_›
╰─$ gem install activerecord -v4.1.1 17 ↵
Fetching: arel-5.0.1.20140414130214.gem (100%)
Successfully installed arel-5.0.1.20140414130214
Fetching: activerecord-4.1.1.gem (100%)
Successfully installed activerecord-4.1.1
2 gems installed

Reply to this email directly or view it on GitHub.

I can’t reproduce the recently reported errors, and this issue is actually about an issue with Bundler 1.2.1.

If any of you are still having a problem with Bundler 1.6.4, please follow ISSUES and open a new ticket. This issue is closed.

had the same issue. downgrading to bundler 1.6.3 has been helped

If you’re seeing a network error in 1.6.4, try upgrading to 1.6.5. If you
still get an error, please raise a new issue.

On Saturday, July 26, 2014, Roman V. Babenko notifications@github.com
wrote:

had the same issue. downgrading to bundler 1.6.3 has been helped


Reply to this email directly or view it on GitHub
#2379 (comment).

Upgrading to bundler 1.6.5 fixed the issue

1.6.5 worked for me.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Network error while fetching — 0.11.0 #15

in dependency to issue #12 the problem was not full solved with 0.11.0. I have installed 0.11.0 from gems and have furthermore problems.

The client says:

config.rb

access.log

error.log

The text was updated successfully, but these errors were encountered:

Hi and sorry for the delay.
As it said in the post #12 #12 (comment) I don’t really know how to improve download speed when requesting from bundle (Thread? Mutex?).
Seems there are other people using this method, I will try to improve this as soon as possible 🙂

The problem is not the speed, I have try to add specific versiosn to config.rb like you said in your comment. Then I have run bundle more then one trail and I have wait after every trail until to gemirro has finished the 100% accessing of the CPU. In the first trials I get different gems that can not fetch. This shows gemirro was not fast enough to download and serve the gems, but after a trail the gems was available. That shows gemirro has this successfull downloaded. But in the last trails I get every the same gem which was not servable by gemirro. This looks like gemirro don’t load the gem. The problem gem is thread_safe.

woot, seems to be hard to optimize this. Even if I use sinatra in threaded mode I’m getting the error when requesting http://localhost:2000/api/v1/dependencies?gems=rake,rack-test,rspec,simplecov,rubocop,fakefs,slop,httpclient,confstruct,builder,sinatra,thin

Updating all the gems with gemirro update, should fix this now.

sorry for the big delay.

I have made an update:

But I get the same result:

Hi, no problem, I’m currently in vacation 🙂
I will have a look as soon as possible.

Источник

Добрый день.

bundle install --without development test postgresql sqlite
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching source index from https://rubygems.org/
Resolving dependencies...
Network error while fetching https://rubygems.org/quick/Marshal.4.8/nokogiri-1.8.0.gemspec.rz (execution expired)

bundle env
## Environment

```
Bundler   1.15.3
Rubygems  1.8.11
Ruby      1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Git       1.7.9.5
Platform  x86_64-linux
OpenSSL   OpenSSL 1.0.1 14 Mar 2012
```

## Bundler settings

```
without
  Set for your local app (/home/ubuntu/redmine/.bundle/config): "development:test:postgresql:sqlite"
```

## Gemfile

### Gemfile

```ruby
source 'https://rubygems.org'

if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
  abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).nPlease update with 'gem update bundler'."
end

gem "rails", "5.1.2"
gem "coderay", "~> 1.1.1"
gem "request_store", "1.0.5"
gem "mime-types", "~> 3.0"
gem "actionpack-xml_parser"
gem "roadie-rails", "~> 1.2.1"
gem "roadie", "~> 3.2.1"
gem "mimemagic"

gem "nokogiri", "~> 1.8.0"
gem "i18n", "~> 0.7.0"

# Request at least rails-html-sanitizer 1.0.3 because of security advisories
gem "rails-html-sanitizer", ">= 1.0.3"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
gem "rbpdf", "~> 1.19.2"

# Optional gem for LDAP authentication
group :ldap do
  gem "net-ldap", "~> 0.16.0"
end

# Optional gem for OpenID authentication
group :openid do
  gem "ruby-openid", "~> 2.3.0", :require => "openid"
  gem "rack-openid"
end

platforms :mri, :mingw, :x64_mingw do
  # Optional gem for exporting the gantt to a PNG file, not supported with jruby
  group :rmagick do
    gem "rmagick", ">= 2.14.0"
  end

  # Optional Markdown support, not for JRuby
  group :markdown do
    gem "redcarpet", "~> 3.4.0"
  end
end

# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
  database_config = YAML::load(ERB.new(IO.read(database_file)).result)
  adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  if adapters.any?
    adapters.each do |adapter|
      case adapter
      when 'mysql2'
        gem "mysql2", "~> 0.4.6", :platforms => [:mri, :mingw, :x64_mingw]
      when /postgresql/
        gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlite3/
        gem "sqlite3", "~>1.3.12", :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlserver/
        gem "tiny_tds", "~> 1.0.5", :platforms => [:mri, :mingw, :x64_mingw]
        gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw]
      else
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
      end
    end
  else
    warn("No adapter found in config/database.yml, please configure it first")
  end
else
  warn("Please configure your config/database.yml first")
end

group :development do
  gem "rdoc", "~> 4.3"
  gem "yard"
end

group :test do
  gem "rails-dom-testing"
  gem "mocha"
  gem "simplecov", "~> 0.14.1", :require => false
  # For running system tests
  gem 'puma', '~> 3.7'
  gem "capybara", '~> 2.13'
  gem "selenium-webdriver"
end

local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
  eval_gemfile local_gemfile
end

# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
  eval_gemfile file
end
```

### Gemfile.lock

```
<No /home/ubuntu/redmine/Gemfile.lock found>
```

У меня есть сервер с Rackspace, который я использую для нескольких сайтов Ruby. Когда я пробую bundle install на новом сайте, я получаю

Retrying download gem from http://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::UnknownHostError timed out (http://rubygems.org/gems/rake-12.3.1.gem)

Или пытаясь gem update --system я получаю

ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
timed out (http://api.rubygems.org/specs.4.8.gz)

Что я пробовал:

  • Использование curl для загрузки URL-адреса драгоценного камня при первой ошибке (успешно)
  • Измените источник драгоценного камня с https://rubygems.org на http://rubygems.org
  • Измените серверы имен на срезе, чтобы использовать Google
  • Скачивание и обновление gem из исходников (2.7.6)
  • Беги apt-get update
  • Добавление AddTrustExternalCARoot-2048.pem

Что еще не пробовал:

  • Жертвоприношение животных
  • Счастливая кроличья лапка
  • Удаление всех файлов и переустановка образа

Я наконец-то (непосредственно перед отправкой этого) смог заставить bundle install работать, удалив rubygems.org в качестве источника и добавив https://gems.ruby-china.org/. Почему gem не может получить доступ к rubygems.org?

person
mrturtle
  
schedule
12.04.2018
  
source
источник


Ответы (9)

api.rubygems.org в настоящее время испытывает проблемы с настройкой IPv6: это имя хоста имеет 4 адреса IPv6, но не отвечает ни на один из них. Ни к ping, ни к попыткам TCP соединения. Когда вы запускаете gem, ваш gem сначала пробует адреса IPv6 и истекает время ожидания на них, не имея времени даже попробовать адреса IPv4.

Решение состоит в том, чтобы снизить приоритет адресов IPv6 для api.rubygems.org, чтобы gem сначала пробовал адреса IPv4. Для этого поместите эти строки в /etc/gai.conf:


# Debian defaults.
precedence  ::1/128         50
precedence  ::/0            40
precedence  2002::/16       30
precedence  ::/96           20
precedence  ::ffff:0:0/96   10

# Low precedence for api.rubygems.org IPv6 addresses.
precedence  2a04:4e42::0/32  5

person
Alexei Khlebnikov
  
schedule
15.05.2018

Я не нашел /etc/gai.conf в MacOS, поэтому в качестве обходного пути я просто отключил IPV6 для загрузки драгоценных камней. Это сработало для меня.

«Системные настройки» -> «Сеть» -> Выбрать WiFi -> нажмите кнопку «Дополнительно» -> выберите вкладку «TCP / IP» -> установите для параметра «Настроить IPV6» значение «только локальная ссылка».

person
Mauricio Mora
  
schedule
25.06.2018

Я добавил строку ниже в свой / etc / hosts, и она работает.

151.101.192.70 rubygems.org

person
Taka Suzuki
  
schedule
25.03.2019

Для всех, кто сталкивается с этой проблемой, начиная с версии rubygems 3.2.11, мы теперь поставляем исправление для этой проблемы внутри rubygems.

Если у вас возникла эта проблема, вам сначала необходимо обновить rubygems как минимум до версии 3.2.11. Обычно вы делаете это, выполняя gem update --system, но вполне вероятно, что вы столкнетесь с той же проблемой при выполнении этой команды. В этом случае вы можете обновить rubygems вручную, следуя этим инструкциям: https://bundler.io/v2.2/guides/rubygems_tls_ssl_troubleshooting_guide.html#updating-rubygems.

После обновления поставьте

:ipv4_fallback_enabled: true

внутри вашего ~/.gemrc файла и rubygems больше не должны истекать по таймауту.

Причина, по которой мы еще не включили это по умолчанию, заключается в том, что для этого требовались основные классы рубина monkeypatching, поэтому мы хотели сначала немного протестировать битву исправлений. А также, поскольку основная проблема связана с рубином, которому в настоящее время не хватает реализации счастливых глаз, но в настоящее время над ним работают, поэтому нам, возможно, вообще не понадобится включать наши обезьяньи патчи по умолчанию, если это исправление скоро появится в рубине.

Для справки, исправление попало в наш репо здесь: https://github.com/rubygems/rubygems/pull/2662, а проблема с рубином работает здесь: https://github.com/ruby/ruby/pull/4038.

person
deivid
  
schedule
26.02.2021

На данный момент проблемы IPv6 с rubygems.org все еще существуют, хотя, похоже, не всегда и не везде. Я столкнулся с этим с VPS в одном дата-центре, но не в другом. Ответ Алексея Хлебникова выше — это, безусловно, лучший и самый простой способ обойти проблему (по крайней мере, в Linux). Тем не менее, не забудьте выполнить собственный поиск IPv6-адресов api.rubygems.org; Я обнаружил, что указанные выше адреса больше не верны.

$ dig AAAA api.rubygems.org +short
rubygems.org.
2a04:4e42::70
2a04:4e42:400::70
2a04:4e42:600::70
2a04:4e42:200::70

person
bpope
  
schedule
16.08.2018

У меня все еще была та же проблема. Комбинация вышеперечисленного сработала для меня, так что спасибо всем. Вот что у меня сработало (я на Linux):

В терминале введите:

dig AAAA api.rubygems.org

Найдите следующее:

;; ANSWER SECTION:
api.rubygems.org.   60  IN  CNAME   rubygems.org.
rubygems.org.        0  IN  A   151.101.192.70

скопируйте IP-адрес (в моем случае 151.101.192.70, но, согласно приведенным выше ответам, это может отличаться для вас, поэтому обязательно выполните этот шаг и проверьте сами) и перейдите по ссылке:

etc/

и откройте файл хоста так:

sudo vim hosts

Вы должны открыть файл как суперпользователь, иначе вы не сможете его сохранить, поскольку это файл только для чтения. Я использовал vim, но вы можете использовать другой редактор. Внизу укажите скопированный IP-адрес, а затем rubygems.org, например:

151.101.192.70 rubygems.org

Сохраните файл и выйдите. Вы можете попробовать соединение в своем терминале, набрав:

ping rubygems.org

Теперь вы должны увидеть непрерывный поток пакетов. Выполнение любой команды gem install теперь также должно работать, если остальная часть вашей среды настроена правильно.

Опять же, я просто публикую это здесь для наглядности и помощи другим, но тяжелая работа была сделана ответами выше, так что спасибо за это :)

person
Benedikt Schnatterbeck
  
schedule
17.07.2020

У меня была такая же проблема с Ubuntu 20.04 с 11 ноября 2020 года. Я отключил ipv6, и он начал работать для меня. Вот команды для отключения ipv6:

    sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

person
Dipen Chauhan
  
schedule
12.11.2020

Для пользователей Windows проблему можно решить, установив приоритет адресов IPv4 над IPv6 (см. https://superuser.com/a/436944 ). Проверьте свои политики префиксов с помощью PowerShell от имени администратора:

netsh interface ipv6 show prefixpolicies

Вы должны увидеть, что адреса IPv6 (:: / 0) имеют более высокий приоритет над IPv4 (:: / 96 и :: ffff: 0: 0/96). Чтобы исправить это, удалите запись IPv6 и повторно добавьте ее с более низким приоритетом, например:

netsh interface ipv6 del prefixpolicy ::/0
netsh interface ipv6 add prefixpolicy ::/0 3 6

где приоритет 3 на моей машине был ниже, чем у всех остальных, а метка 6 не использовалась.

person
Boon
  
schedule
02.10.2018

Это все еще проблема для меня, по крайней мере, в январе 2020 года. Я использовал решение Takayuki Suzuki, описанное выше, и оно сработало для меня.

person
Gordon
  
schedule
11.01.2020

У меня есть сервер с Rackspace, который я использую для нескольких сайтов Ruby. Когда я пробую bundle install на новом сайте, я получаю

Retrying download gem from http://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::UnknownHostError timed out (http://rubygems.org/gems/rake-12.3.1.gem)

Или пробуя gem update —system, я получаю

ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
timed out (http://api.rubygems.org/specs.4.8.gz)

Что я пробовал:

  • Использование curl для загрузки URL-адреса драгоценного камня при первой ошибке (успешно)
  • Измените источник камня с https://rubygems.org на http://rubygems.org
  • Измените серверы имен на слайсе, чтобы использовать Google
  • Скачивание и обновление gem из исходников (на 2.7.6)
  • Запускаем apt-get update
  • Добавление AddTrustExternalCARoot-2048.pem

Что еще не пробовал:

  • Жертвоприношение животных
  • Счастливая кроличья лапка
  • Удаление всех файлов и переустановка образа

Я наконец (прямо перед отправкой) смог заставить bundle install работать, удалив rubygems.org в качестве источника и добавив https://gems.ruby-china.org/. Почему gem не может получить доступ к rubygems.org?

Перейти к ответу
Данный вопрос помечен как решенный


Ответы
9

Api.rubygems.org в настоящее время испытывает проблемы с настройкой IPv6: это имя хоста имеет 4 адреса IPv6, но не отвечает ни на один из них. Ни к ping, ни к попыткам TCP соединения. Когда вы работаете с gem, ваш gem сначала пробует адреса IPv6 и выходит из строя на них, не имея времени даже попробовать адреса IPv4.

Решение состоит в том, чтобы снизить приоритет адресов IPv6 для api.rubygems.org, чтобы gem сначала пробовал адреса IPv4. Для этого поместите эти строки в /etc/gai.conf:


# Debian defaults.
precedence  ::1/128         50
precedence  ::/0            40
precedence  2002::/16       30
precedence  ::/96           20
precedence  ::ffff:0:0/96   10

# Low precedence for api.rubygems.org IPv6 addresses.
precedence  2a04:4e42::0/32  5

Я не нашел /etc/gai.conf в MacOS, поэтому в качестве обходного пути я просто отключил IPV6 для загрузки драгоценных камней. Это сработало для меня.

«Системные настройки» -> «Сеть» -> Выбрать WiFi -> нажмите кнопку «Дополнительно» -> выберите вкладку «TCP / IP» -> установите для параметра «Настроить IPV6» значение «только локальная ссылка».

На данный момент проблемы IPv6 с rubygems.org все еще существуют, хотя, похоже, не всегда и не везде. Я столкнулся с этим с VPS в одном дата-центре, но не в другом. Ответ Алексея Хлебникова выше — безусловно, лучший и самый простой способ обойти проблему (по крайней мере, в Linux). Тем не менее, не забудьте выполнить собственный поиск IPv6-адресов api.rubygems.org; Я обнаружил, что указанные выше адреса больше не верны.

$ dig AAAA api.rubygems.org +short
rubygems.org.
2a04:4e42::70
2a04:4e42:400::70
2a04:4e42:600::70
2a04:4e42:200::70

Для пользователей Windows проблема может быть решена путем установления приоритета адресов IPv4 над IPv6 (см. https://superuser.com/a/436944). Проверьте свои политики префиксов с помощью PowerShell от имени администратора:

netsh interface ipv6 show prefixpolicies

Вы должны увидеть, что адреса IPv6 (:: / 0) имеют более высокий приоритет над IPv4 (:: / 96 и :: ffff: 0: 0/96). Чтобы исправить это, удалите запись IPv6 и повторно добавьте ее с более низким приоритетом, например:

netsh interface ipv6 del prefixpolicy ::/0
netsh interface ipv6 add prefixpolicy ::/0 3 6

Где приоритет 3 на моей машине был ниже, чем у всех остальных, а метка 6 не использовалась.

Я добавил строку ниже в свой / etc / hosts, и она работает.

151.101.192.70 rubygems.org

Для меня это все еще проблема, по крайней мере, в январе 2020 года.
Я использовал решение Takayuki Suzuki, описанное выше, и оно у меня сработало.

У меня все еще была та же проблема. Комбинация вышеперечисленного сработала для меня, так что спасибо всем. Вот что у меня сработало (я на Linux):

В терминале введите:

dig AAAA api.rubygems.org

Найдите следующее:

;; ANSWER SECTION:
api.rubygems.org.   60  IN  CNAME   rubygems.org.
rubygems.org.        0  IN  A   151.101.192.70

Скопируйте IP-адрес (в моем случае 151.101.192.70, но, согласно приведенным выше ответам, это может отличаться для вас, поэтому обязательно выполните этот шаг и проверьте сами) и перейдите по ссылке:

etc/

И откройте файл хоста так:

sudo vim hosts

Вы должны открыть файл как суперпользователь, иначе вы не сможете его сохранить, поскольку это файл только для чтения. Я использовал vim, но вы можете использовать другой редактор. Внизу укажите скопированный IP-адрес, а затем rubygems.org, например:

151.101.192.70 rubygems.org

Сохраните файл и выйдите. Вы можете попробовать соединение в своем терминале, набрав:

ping rubygems.org

Теперь вы должны увидеть непрерывный поток пакетов. Выполнение любой команды gem install теперь также должно работать, если остальная часть вашей среды настроена правильно.

Опять же, я просто публикую это здесь для наглядности и помощи другим, но тяжелая работа была сделана ответами выше, так что спасибо за это :)

У меня была такая же проблема с Ubuntu 20.04 с 11 ноября 2020 года. Я отключил ipv6, и он начал работать для меня. Вот команды для отключения ipv6:

    sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

Для всех, кто сталкивается с этой проблемой, начиная с версии rubygems 3.2.11, мы теперь поставляем исправление для этой проблемы внутри rubygems.

Если у вас возникла эта проблема, сначала обновите rubygems с помощью gem update —system, а затем установите

:ipv4_fallback_enabled: true

Внутри вашего файла ~/.gemrc и rubygems больше не должны истекать по таймауту.

Причина, по которой мы еще не включили это по умолчанию, заключается в том, что для этого требовались основные классы рубина monkeypatching, поэтому мы хотели сначала немного протестировать битву с исправлениями. А также потому, что основная проблема — это проблема в ruby, в которой в настоящее время отсутствует реализация счастливые глаза, но в настоящее время над ней работают, поэтому нам может вообще не понадобиться включать наши обезьяньи патчи по умолчанию, если это исправление в ruby ​​скоро появится.

Для справки, исправление попало в наш репозиторий здесь: https://github.com/rubygems/rubygems/pull/2662, а проблема с рубином работает здесь: https://github.com/ruby/ruby/pull/4038.

Другие вопросы по теме

r144

unread,

Oct 18, 2013, 11:54:28 PM10/18/13

to rubyversi…@googlegroups.com

hello,

I have installed jruby 1.6.8 with rvm. When I try to install a gem either with the jgem command or with bundle I get mysterious error messages. I was wondering if this is a rubygems.org issue, a jruby issue or a rvm issue?

My Gemfile essentially contains

source ‘http://rubygems.org’
#source ‘https://rubygems.org’

gem ‘rails’, ‘~>3.1.12’

This is what I tried

ruud@janusZ cd rails
You are using ‘.rvmrc’, it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to ‘.ruby-version’ using ‘rvm rvmrc to [.]ruby-version’
or ignore this warning with ‘rvm rvmrc warning ignore /home/ruud/project/vistafactuur/rails/.rvmrc’,
‘.rvmrc’ will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run ‘rvm rvmrc warning ignore all.rvmrcs’.

Using /home/ruud/.rvm/gems/jruby-1.6.8
.Using /home/ruud/.rvm/gems/jruby-1.6.8 with gemset rails

ruud@janusZ rvm —version

rvm 1.23.4 (master) by Wayne E. Seguin <wayneeseg___@__ail.com>, Michal Papis <mpap__@__ail.com> [https://rvm.io/]

ruud@janusZ bundle install
Fetching source index from http://rubygems.org/
Resolving dependencies…
Network error while fetching
http://rubygems.org/quick/Marshal.4.8/rails-3.1.12.gemspec.rz
zsh: exit 17    bundle install
ruud@janusZ wget http://rubygems.org/quick/Marshal.4.8/rails-3.1.12.gemspec.rz
—2013-10-18 21:42:21—  http://ruby…………………….
HTTP request sent, awaiting response… 200 OK
Length: 568 [binary/octet-stream]
Saving to: `rails-3.1.12.gemspec.rz.1′

100%[======================================>] 568         —.-K/s   in 0s     

2013-10-18 21:42:22 (37.3 MB/s) — `rails-3.1.12.gemspec.rz.1′ saved [568/568]

The connection is no problem here, but the ‘network error’ keeps recurring.

ruud@janusZ gem install rails -v 1.3.12
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem ‘rails’ (= 1.3.12) in any repository
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rails
zsh: exit 2
ruud@janusZ gem install rails -v 1.3.12
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem ‘rails’ (= 1.3.12) in any repository
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rails
zsh: exit 2

When I change in the source line ‘http’ to ‘https’, the message becomes

ruud@janusZ bundle install
Fetching source index from https://rubygems.org/
Resolving dependencies…
Could not find gem ‘rails (~> 3.1.12) java’ in the gems available on this
machine.
zsh: exit 7     bundle install

It can be the question is on the wrong list. I simply don’t know or understand enough where to start. I am really out of ideas. Who can help me?

thanks in advance!! Ruud

mpapis

unread,

Oct 19, 2013, 1:49:07 AM10/19/13

to rubyversi…@googlegroups.com

1. Update your java, it is important to get latest security updates (they will include ssl certificates for rubygems)
2. Update your JRuby, the team has put a lot of effort to make JRuby 1.7.5 a lot better then earlier versions

r144

unread,

Oct 20, 2013, 12:46:56 PM10/20/13

to rubyversi…@googlegroups.com

On Friday, October 18, 2013 11:49:07 PM UTC+2, mpapis wrote:

1. Update your java, it is important to get latest security updates (they will include ssl certificates for rubygems)

 thanks Michal,

I was using java 1.6 (openjdk); updating to 1.7 was sufficient to solve the problem. I cannot change the jruby version by now, but I keep your advice in mind. Thanks again!

Ruud

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Gem ext builderror error failed to build gem native extension
  • Geforce security update driver продолжить установку невозможно произошла ошибка
  • Geforce now ошибка установки
  • Geforce now ошибка синхронизации steam
  • Geforce now error c0f1103f

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии