Skip to content

Instantly share code, notes, and snippets.

@x-yuri
Last active May 1, 2024 00:38
Show Gist options
  • Save x-yuri/c543e6259a370215e72aa397ade89692 to your computer and use it in GitHub Desktop.
Save x-yuri/c543e6259a370215e72aa397ade89692 to your computer and use it in GitHub Desktop.
gem: slow install

gem: slow install

In 3.2.3 RubyGems started to use the Compact Index API (commit, PR, changelog).

RubyGems.org Dependency API Deprecation
Dependency API Deprecation Delayed
RFC

a.sh

docker run --rm -it ruby:2.6.10-alpine3.15 sh -euxc '
    gem update --system 3.2.2
    sed -Ei "/rescue Gem::RemoteFetcher::FetchError/aputs \"-- fallback\"" /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/source.rb
    time gem install mina
    gem uninstall -x mina
    gem update --system 3.2.3
    sed -Ei "/rescue Gem::RemoteFetcher::FetchError/aputs \"-- fallback\"" /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/source.rb
    time gem install mina
'
$ sh a.sh
+ gem update --system 3.2.2
+ sed -Ei '/rescue Gem::RemoteFetcher::FetchError/aputs "-- fallback"' /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/source.rb
+ time gem install mina
-- fallback
Fetching mina-1.2.5.gem
Successfully installed mina-1.2.5
1 gem installed
real	1m 15.98s
user	1m 11.28s
sys	0m 0.72s
+ gem uninstall -x mina
+ gem update --system 3.2.3
+ sed -Ei '/rescue Gem::RemoteFetcher::FetchError/aputs "-- fallback"' /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/source.rb
+ time gem install mina
Fetching mina-1.2.5.gem
Successfully installed mina-1.2.5
1 gem installed
real	0m 1.20s
user	0m 0.47s
sys	0m 0.10s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment