Bug 1308738

Summary: Unable to fetch remote gems
Product: [Fedora] Fedora Reporter: Matt Spaulding <mspaulding06>
Component: rubygem-gem2rpmAssignee: Vít Ondruch <vondruch>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: mastahnke, strzibny, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-22 13:04:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matt Spaulding 2016-02-15 22:11:24 UTC
Description of problem:
gem2spec is not able to download gems when using the "--fetch" command line argument.  This is due to a redirect from http to https which is forbidden.

Version-Release number of selected component (if applicable):
0.11.2-1

How reproducible:
Every time

Steps to Reproduce:
1. Run command such as: gem2rpm --fetch -s librarian-puppet

Actual results:

/usr/share/ruby/open-uri.rb:224:in `open_loop': redirection forbidden: http://rubygems.org/api/v1/gems/librarian-puppet.json -> https://rubygems.org/api/v1/gems/librarian-puppet.json (RuntimeError)
	from /usr/share/ruby/open-uri.rb:150:in `open_uri'
	from /usr/share/ruby/open-uri.rb:716:in `open'
	from /usr/share/ruby/open-uri.rb:34:in `open'
	from /usr/share/gems/gems/gem2rpm-0.11.2/bin/gem2rpm:103:in `<top (required)>'
	from /usr/bin/gem2rpm:23:in `load'
	from /usr/bin/gem2rpm:23:in `<main>'


Expected results:

Gem file is downloaded and source rpm is built.

Additional info:

I edited the gem2rpm source to use https instead of http and that fixed the problem for me.

Comment 1 Vít Ondruch 2016-02-22 13:04:41 UTC
Hi and thanks for the report.

By coincidence, this was recently reported upstream:

https://github.com/fedora-ruby/gem2rpm/issues/55

If you don't mind, I am closing this ticket in favor of the upstream ticket. Feel free to reopen if you have any additional concerns.