-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bundler 1.10.6 can't find gems with invalid gemspec files #3895
Comments
This was necessary to ensure backwards compatibility, but we'll go back to rejecting invalid gemspecs entirely in 2.0. |
Which gemspecs loaded on 1.9 but not on 1.10? Gems that have stopped working are a bug, and we should fix it. |
Sorry for not providing a more concrete example upfront. The default gemspec files generated by bundler actually exhibit this problem (since they have Here's an example gem with a gemspec that demonstrates this problem: https://github.com/GUI/test_bundler_invalid_gem This gem was generated by running Then for a simple demonstration of the issue, here's a minimal source "https://rubygems.org"
gem "test_bundler_invalid_gem", :git => "https://github.com/GUI/test_bundler_invalid_gem.git" Under Bundler 1.9.10, this dependency works and exhibits no warnings: $ bundle --version
Bundler version 1.9.10
$ bundle
Updating https://github.com/GUI/test_bundler_invalid_gem.git
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using test_bundler_invalid_gem 0.1.0 from https://github.com/GUI/test_bundler_invalid_gem.git (at master)
Using bundler 1.9.10
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle exec irb
irb(main):001:0> Under Bundler 1.10.5, this dependency causes
Under 1.10.6,
Obviously, all of this can be resolved by removing the Thanks! |
Ah, so that is a bug! |
Thing is, at this point An easy fix is to do instead @segiddins WDYT? |
Ugh, that's right. Maybe we need to revert the silencing changes as well? :( |
@indirect for now, let's just go with |
Works for me. |
Output gemspec validation errors on exec commands Fixes #3895.
Output gemspec validation errors on exec commands Fixes #3895.
- I was having trouble using the napoleon github repo directly via the Gemfile in the dispersion app (the new user manager app for BDT). the error I was getting: rubygems/bundler#3895
I'm using wiselinks from this branch https://github.com/aishek/wiselinks/tree/ie8-fallback-fix ❯ bundler -v 2.3.0p0
Bundler version 1.11.2 So is this error is still error? |
@onemanstartup yes, the gemspec is still invalid--please remove the duplicate dependency so that rubygems can validate the gem. |
newer version of bundler fail to validate with this error see: rubygems/bundler#3895
@indirect it works. strange thing, now when I install fixed version i can install now previous bugged version. Anyway, thanks. |
I am not sure If this can be put here or not but maybe someone can figure out. I am getting this gemspec related issue too.
I am not able to figure out the solution. |
I have a custom gem that is installed from a git source in my Gemfile. After upgrading from Bundler 1.9 to Bundler 1.10.6, I started receiving errors that the gem could not be found when trying to load anything that interacted with the gem (in this example, it's spinning up a rails server):
After downgrading to 1.10.5, things would still fail to start, but I at least got a more helpful error that led me to the actual problem:
So while this is certainly a solvable problem with my gem (since the gemspec is indeed invalid), the current behavior in 1.10.6 is somewhat confusing, since
bundle install
reports installing the gem without any warnings, but then when trying to load the gem it simply reports it as missing.I think the change in behavior is related to this change: #3856 I think the attempt with that pull request was to actually allow these invalid gemspecs to continue working on 1.10, but it seems like it's perhaps just deferred the error to later when the loading fails (but in a less obvious way). Did something else maybe change earlier on the 1.10 branch that's completely excluding these invalid gemspecs from the gems Bundler will load?
I'm seeing this under Ruby 2.2.1 and RubyGems 2.4.5.
Thanks!
The text was updated successfully, but these errors were encountered: