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

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

@rocket-turtle

Description

@rocket-turtle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions