-
-
Notifications
You must be signed in to change notification settings - Fork 2k
bundler doesn't recognize spork-0.9.0.rc7 #1202
Comments
Strange. What version of bundler are you using? |
Here's some more info:
So it's something about bundler-1.0.13 + rubygems-1.3.7 + spork-0.9.0.rc7. Gotta love it! |
Yeah, that's pretty odd. I'll check it out as soon as I get the chance. On May 25, 2011, at 11:49 AM, dchelimsky [email protected] wrote:
|
Might be the same as issue #1054 |
This is a bug in rubygems and is fixed in later versions of rubygems, I believe 1.4+ |
Can be worked around in Bundler for pre-1.4 compatibility, while RubyGems updates settle down a bit? |
You can just upgrade to Rubygems 1.4 for the fix for this issue. You don't have to upgrade all the way to Rubygems 1.8.5. That said, if you feel like writing a workaround, I would happily apply it. :) |
I'm not sure where best to put this monkeypatch, but it seems to do the job. (I put it at the top of runtime.rb.) # fix bug in Rubygems < 1.4 by forcing calculation of @segments
if Gem::Version.new(Gem::VERSION) < Gem::Version.new("1.4.0")
class Gem::Version
def segments # :nodoc:
unless @segments_generated
@segments = @version.scan(/[0-9]+|[a-z]+/i).map do |s|
/^\d+$/ =~ s ? s.to_i : s
end
end
@segments_generated = true
@segments
end
end
end If you'd like me to fork, patch, and make a pull-request, I can, but as it's such a hack, I would prefer a Bundler person to decide where it goes. |
I had the same problem and the patch works for me as well. Thanks @dburt. |
This should be fixed in 1.1.pre.7 and 1.0.17. Can someone verify this is the case? |
They look good to me. This also fixes issue #1054, which should therefore also be closed. My test process and output is described below.
|
Thanks for looking into all this again @dburt. |
Glad to help. |
seems to be broken again due to bad23b5 |
Do you have a test for that, @hone? Isn't that changeset included in 1.0.17 and 1.1.pre7, which don't exhibit the problem, and 1.0.18 which still works? I recall adding the lines that are removed by bad23b5 deliberately to workaround a problem like this, but these releases don't include them and appear to me to work fine. |
i had to patch the exact patch iirc because it broke rake. I have a test for that. I couldn't come up with a test case for bundle cache on 1.3.7. This is fixed now. |
So this issue seems to me to be broken again in 1.0.18, but you're saying it's fixed in 1.0.19rc or 1.0.20rc? |
I'm seeing some weird behavior that might be related...
Why does bundler add it then immediately remove it? Here's more info...
Thanks for the help. P.S. Still see same behavior with bundler-1.1.rc. |
Thanks for the report, @cjbottaro, that's definitely the same issue.
Because it's in two minds about the version number part "rc9" and the version in the cache ["rc9"] is not equal to the latest bundled version ["rc", "9"] or something like that, due to a bug in Gem::Version#segments in old Rubygems (<1.4). |
FWIW, running the same versions of Rubygems (1.3.7) and Bundler (1.0.21 and 1.1.rc) as @cjbottaro, I do not encounter the problem. I'm on Ruby 1.8.7 but I'm not sure what other platform differences might make the difference. |
Spork will not install with a bundle install $ gem --version |
@david-harkness, please open a ticket with the information from ISSUES. |
This was the problem. #1259 I ran a bundle install --without development, earlier in the day. |
This is a bit odd:
The text was updated successfully, but these errors were encountered: