Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Prerelease gems with - cause bundle show to fail #4385

Closed
indirect opened this issue Mar 21, 2016 · 4 comments
Closed

Prerelease gems with - cause bundle show to fail #4385

indirect opened this issue Mar 21, 2016 · 4 comments

Comments

@indirect
Copy link
Member

$ cat Gemfile
source "https://rubygems.org"
gem "rack-timeout", "0.4.0-beta.1", github: "heroku/rack-timeout"

$ bundle install
Fetching git://github.com/heroku/rack-timeout.git
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using bundler 1.12.0.rc
Using rack-timeout 0.4.0.pre.beta.1 from git://github.com/heroku/rack-timeout.git (at master@e6d7211)
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Bundled gems are installed into ./.bundle.

$ bundle show
The git source git://github.com/heroku/rack-timeout.git is not yet checked out. Please run `bundle install` before trying to start your application

$ bundle exec echo what
what

$ bundle show
The git source git://github.com/heroku/rack-timeout.git is not yet checked out. Please run `bundle install` before trying to start your application

First, it should never be possible to have install succeed and then have show fail. It should be doubly-impossible to have install and exec both succeed and still have show fail. Lastly, Bundler says it's using rack-timeout 0.4.0.pre.beta.1. That's not a version that exists, because the gemspec for rack-timeout has the version set to 0.4.0-beta.1.

???

@indirect
Copy link
Member Author

Seems like the pre weirdness is coming from RubyGems:

irb(main):002:0> Gem::Requirement.new("~> 0.4.0-beta.1")
=> #<Gem::Requirement:0x007feae983ca80 @requirements=[["~>", #<Gem::Version "0.4.0.pre.beta.1">]]>

@segiddins
Copy link
Member

@segiddins
Copy link
Member

So what's super weird is that bundle show rack-timeout --verbose works...

@segiddins
Copy link
Member

I have a fix

@segiddins segiddins self-assigned this Mar 22, 2016
@segiddins segiddins changed the title Prerelease gems are... pretty broken Prerelease gems with - cause bundle show to fail Mar 28, 2016
homu added a commit that referenced this issue May 16, 2016
[Git] Fix checking for equality when a version includes a -

Closes #4385.
segiddins pushed a commit that referenced this issue May 16, 2016
[Git] Fix checking for equality when a version includes a -

Closes #4385.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants