Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

This rubygem could not be found. (Gems::NotFound) #40

Open
rocket-turtle opened this issue Jan 3, 2020 · 1 comment
Open

This rubygem could not be found. (Gems::NotFound) #40

rocket-turtle opened this issue Jan 3, 2020 · 1 comment

Comments

@rocket-turtle
Copy link

rocket-turtle commented Jan 3, 2020

Hi,

we use multiple gem Servers. (e.g https://rubygems.org and https://rails-assets.org)
Since Version 1.2 of the gem https://github.com/rubygems/gems an exception is thrown if the gem could not be fetched:

So now I get the error:

	 5: from .../gems/gemsurance-0.10.0/lib/gemsurance/gem_info_retriever.rb:139:in `block in retrieve'
	 4: from .../gems/gems-1.2.0/lib/gems.rb:17:in `method_missing'
	 3: from ...gems/gems-1.2.0/lib/gems/client.rb:26:in `info'
	 2: from .../gems/gems-1.2.0/lib/gems/request.rb:13:in `get'
	 1: from .../gems/gems-1.2.0/lib/gems/request.rb:57:in `request'
/.../gems/gems-1.2.0/lib/gems/request.rb:73:in `body_from_response': This rubygem could not be found. (Gems::NotFound)

It works when I change the file gemsurance-0.10.0/lib/gemsurance/gem_info_retriever.rb

        homepage_uri      = current_spec.homepage
        documentation_uri = ''
        source_code_uri   = ''

        begin
          info = ::Gems.info(active_spec.name)

          homepage_uri      = info['homepage_uri']
          documentation_uri = info['documentation_uri']
          source_code_uri   = info['source_code_uri']
        rescue StandardError => ex
          puts "#{self.class}.#{__method__}: Error while fetching Gem #{active_spec.name} - #{ex}"
        end

But I think this is not the best solution, because we should not ask the rubygems.org server for informations if we do not install the gem from this server.

@Bialogs
Copy link

Bialogs commented Mar 31, 2020

I am also having this problem when mixing git sources with rubygems sources in my Gemfile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants