Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

stickler mirror does not work #4

Closed
kenotron opened this Issue · 3 comments

3 participants

@kenotron

When I do a:

stickler mirror --server http://localhost:6789/ --gem-version 3.0.3 rails

I get this:

ERROR -> can't modify frozen string

This is a bug in the spec_lite.rb, line 20:

@version = Gem::Version.new( version )

This apparently causes my RubyGems 1.3.7 running on Ruby 1.9.2 to fail with a "can't modify frozen string" error. There are 2 ways I fixed it (both strange and hacky):

@version = version #Gem::Version.new( version )

OR run stickler like:

stickler mirror --server http://localhost:6789/ --gem-version=3.0.3 rails

And after these hacks, I further ran into this issue:

undefined method 'first' for "http://production.cf.rubygems.org/gems/rails-3.0.3.gem":String

Resourceful is buggy in that it tries to follow redirects and assumes that the response "Location" header is always an array. I suggest that Stickler would ditch the use of Resourceful gem (use CURL or Net::Http).

@schlick

I've been trying to figure out how to fix this but no luck so far.

@copiousfreetime

Looks like this is because the strings in ARGV are frozen, and Gem::Version.new does a strip! on its parameter. The version from --gem-version ends up being handed directly down to Gem::Version and as such is a frozen string and strip! modifies its receiver.

this is fixed in the next version

@copiousfreetime

Version 2.1.3 pushed fixing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.