# Rubygems: bad urls

**URL:** <https://www.ruby-forum.com/t/rubygems-bad-urls/181595>\
**Category:** Ruby\
**Created:** [January 14, 2010, 9:57am UTC](https://www.ruby-forum.com/t/rubygems-bad-urls/181595 "2010-01-14T09:57:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![willwach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/c68b51/32.png) [@willwach](https://www.ruby-forum.com/u/willwach)\
**Post date:** [January 14, 2010, 9:57am UTC](https://www.ruby-forum.com/t/rubygems-bad-urls/181595/1 "2010-01-14T09:57:05Z")

</div>

I patched ruby gems successfully so that it outputs ruby packages so  
that I can feed them into the Nix package manager system  
([www.nixos.org](http://www.nixos.org)).

One item of the generated output looks like this:

jeremymcanally\_pending\_0\_1 = rubyDerivation {  
name = “ruby-jeremymcanally-pending-0.1”; # full\_name  
nameNoVersion = “jeremymcanally\_pending”;  
propagatedBuildInputs = [];  
src = fetchurl {  
url =  
“[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/jeremymcanally-pending-0.1.gem)”;  
sha256 = “no hash”;  
};  
meta = {  
homepage = “[http://jeremymcanally.com](http://jeremymcanally.com)”;  
license = []; # one of ?  
description = “pending lets you define a block of test code that  
is currently "pending" functionality, similar to RSpec’s pending  
method”; # cut to 120 chars  
longDescription = “pending lets you define a block of test code  
that is currently "pending" functionality, similar to RSpec’s pending  
method.”;  
};  
};

And you can see by “no hash” that something is wrong with this gem. It’s  
not only that one. By resolving dependencies for:

up chronic rubygems-update xrefresh-server rb-inotify jeweler

these .gem urls are invalid:

[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/jeremymcanally-pending-0.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/devver-construct-1.1.0.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/mhennemeyer-output_catcher-1.0.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/thoughtbot-shoulda-2.10.2.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/jeremymcanally-pending-0.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/devver-construct-1.1.0.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/mhennemeyer-output_catcher-1.0.1.gem)  
[RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/thoughtbot-shoulda-2.10.2.gem)

So what’s happening here?  
Of course I can start fetching those gems manually from git repositories  
etc. But isn’t the purpose of gems that I can install them easily ?

Should I contact the authors and ask them to upload a new version?  
Actually I have kind of bootstrapping problem: I’d like to use rake to  
build the gem files. However rake requires jeweler. I can’t install  
jeweler because of bad hashs.

Is there a way to fix those gem urls?

Yes, I am new to ruby.

Marc W.

---

<div class="post-metadata">

**Author:** ![willwach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/c68b51/32.png) [@willwach](https://www.ruby-forum.com/u/willwach)\
**Post date:** [January 14, 2010, 10:16am UTC](https://www.ruby-forum.com/t/rubygems-bad-urls/181595/2 "2010-01-14T10:16:59Z")

</div>

On 14.01.2010 09:56, Marc W. wrote:

> So what’s happening here?

Gems are hosted on [gemcutter.org](http://gemcutter.org) by now, not RubyGems.

---

<div class="post-metadata">

**Author:** ![willwach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/c68b51/32.png) [@willwach](https://www.ruby-forum.com/u/willwach)\
**Post date:** [January 14, 2010, 2:47pm UTC](https://www.ruby-forum.com/t/rubygems-bad-urls/181595/3 "2010-01-14T14:47:23Z")

</div>

On Jan 14, 6:16 am, Phillip G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 14.01.2010 09:56, Marc W. wrote:
> 
> > So what’s happening here?
> 
> Gems are hosted on [gemcutter.org](http://gemcutter.org) by now, not RubyGems.

[gems.rubyforge.org](http://gems.rubyforge.org) == [gemcutter.org](http://gemcutter.org)

“Hosted” has nothing to do with “downloading”

The above URLs:

[http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem](http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem)

Are simple redirects to Amazon S3/CDN hosted files:

curl --head [RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem)

HTTP/1.1 302 Found  
Date: Thu, 14 Jan 2010 13:42:11 GMT  
Server: Apache/2.2.3 (Red Hat) mod\_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5  
Phusion\_Passenger/2.2.5  
X-Powered-By: Phusion Passenger (mod\_rails/mod\_rack) 2.2.5  
X-Rack-Cache: miss  
Location:  
[http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem](http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem)  
Status: 302  
Vary: Accept-Encoding  
Content-Type: text/html

====

If Nix cannot resolve over redirects, then you will need to indicate  
the CDN location.

---

<div class="post-metadata">

**Author:** ![willwach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/c68b51/32.png) [@willwach](https://www.ruby-forum.com/u/willwach)\
**Post date:** [January 15, 2010, 5:39am UTC](https://www.ruby-forum.com/t/rubygems-bad-urls/181595/4 "2010-01-15T05:39:08Z")

</div>

Excerpts from Luis L.'s message of Thu Jan 14 14:45:10 +0100 2010:

> # “Hosted” has nothing to do with “downloading” HTTP/1.1 302 Found
> 
> If Nix cannot resolve over redirects, then you will need to indicate  
> the CDN location.

It can. However shouldn’t I be able to download this gem by copy pasting  
this url into any browser?  
[http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem](http://gems.rubyforge.org/gems/bmabey-fakefs-0.1.1.1.gem)  
 → [http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem](http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem)  
Fine. Follow the next redirect as well, please:

marc i%curl -I  
[http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem](http://production.cf.rubygems.org/gems/bmabey-fakefs-0.1.1.1.gem)  
/home/marc nixos  
HTTP/1.0 403 Forbidden  
x-amz-request-id: 931D4C5FBECF8B78  
x-amz-id-2:  
10cd/tT0szcqveVz+f+uInM31pZaLG6T/wwI0SIK1i/SNtXQbYXuVIDzerqYGsZj  
Content-Type: application/xml  
Date: Fri, 15 Jan 2010 04:37:17 GMT  
Server: AmazonS3  
X-Cache: Error from cloudfront  
X-Amz-Cf-Id:  
fc3f620e9e4e8aab9a72ee9d6aed8ee8b50c555b52119dfe1863dda7a76c795fa31da7b5e6d9b222,230ac8a9dcbf5ae73328942d7d8a086af9191c7b0cf2ab8e1d711c4d078f43ed628c2cd02e5bc1eb  
Via: 1.0 [a2289d8b15b881db1c42086062568883.cloudfront.net:11180](http://a2289d8b15b881db1c42086062568883.cloudfront.net:11180)  
(CloudFront), 1.0 [3aa04125cfbe212eb3783a1b1caebdb5.cloudfront.net:11180](http://3aa04125cfbe212eb3783a1b1caebdb5.cloudfront.net:11180)  
(CloudFront)  
Connection: close

So access is forbidden. Thus the link is broken.  
Redirection does work fine for many other .gem packages.

Marc W.
