technicalpickles / jeweler

Opinionated tool for creating and managing Rubygem projects
MIT License
1.48k stars 164 forks source link

Can't version bump #245

Closed tigris closed 11 years ago

tigris commented 11 years ago

Trying to version bump results in undefined method '[]' for #<Pathname:VERSION.yml>

I tracked it down to the git gem not dealing with Pathname objects, see https://github.com/schacon/ruby-git/blob/master/lib/git/base.rb#L263

In jeweler, you are passing a Pathname object to Git::Base.add, and since it is not a String, it is trying to git add . and assuming the Pathname object is an options Hash, which it is not. Simply calling .to_s on the Pathname here https://github.com/technicalpickles/jeweler/blob/master/lib/jeweler/commands/version/base.rb#L25 fixes the problem, but I am not sure how widespread this problem might be.

alexdean commented 11 years ago

:+1: I'm affected by the same issue.

chetan commented 11 years ago

Looks like the functionality changed in git-1.2.6:

https://github.com/schacon/ruby-git/commit/7905a8456d1b45b1fbd8e0aabe9bf24530abdbcd

to_s should be a simple fix here.

pwnall commented 11 years ago

I bumped into this and submitted a fix in #247.

edmundhighcock commented 11 years ago

Hi people, glad this got fixed. When will this fix be released onto rubygems?

Thanks,

Edmund

technicalpickles commented 11 years ago

@emilsoman still need a release that includes #247, see @edmundhighcock's comment here and @tibbon's on https://github.com/technicalpickles/jeweler/pull/247

emilsoman commented 11 years ago

Released 1.8.8 - a5d16c6ec0c4c07547ca98cf620cfb4b97a52ecb

technicalpickles commented 11 years ago

@emilsoman :sparkling_heart:

pwnall commented 11 years ago

Thank you very much, @emilsoman!