- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.8k
 
Description
nokogiri gem on Linux can not be downloaded
Download gem from https://rubygems.org/ due to error: Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem).
The 403 error XML looks like a typical AWS response. The status page list AWS as Operational: https://status.rubygems.org/
Although the London LCY Fastly instance is under maintenance. I'm located in Denmark. Presumably I should be routed through Copenhagen, Oslo, Frankfurt or Amsterdam. So I don't think that has any effect.
Steps to Reproduce
- Go to https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem and get an 403 Forbidden.
 
Or
- On a x86 64-bit Linux system
 cdinto any folder that has a Gemfile with"nokogiri"- Run 
bundle install - Observe that the following errors:
 
Retrying download gem from https://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem)
Retrying download gem from https://rubygems.org/ due to error (3/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem)
Retrying download gem from https://rubygems.org/ due to error (4/4): Gem::RemoteFetcher::FetchError bad response Forbidden 403 (https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem)
Bundler::HTTPError: Could not download gem from https://rubygems.org/ due to underlying error <bad response Forbidden 403
(https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem)>
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/rubygems_integration.rb:408:in `rescue in download_gem'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/rubygems_integration.rb:381:in `download_gem'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/source/rubygems.rb:479:in `download_gem'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/source/rubygems.rb:436:in `fetch_gem'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/source/rubygems.rb:420:in `fetch_gem_if_possible'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/source/rubygems.rb:162:in `install'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/installer/gem_installer.rb:55:in `install'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/installer/parallel_installer.rb:133:in `do_install'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/worker.rb:62:in `apply_func'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/worker.rb:54:in `loop'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/worker.rb:54:in `process_queue'
  /usr/share/rubygems-integration/all/gems/bundler-2.6.3/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'
An error occurred while installing nokogiri (1.18.3), and Bundler cannot continue.
In Gemfile:
  nokogiri
Expected Behavior
https://rubygems.org/gems/nokogiri-1.18.3-x86_64-linux.gem should be reachable.
Current Behavior
bundle install with `"nokogiri" should succeed.
Possible Solution
Probably AWS mis-configuration.
Environment
Browser and its version: Firefox-esr: Mozilla Firefox 128.7.0esr
RubyGems version: 3.6.3
Bundler version: 2.6.3
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]