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

Remove "or available on this machine" from GemNotFound error in --path mode #4854

Closed
indirect opened this issue Aug 9, 2016 · 3 comments
Closed

Comments

@indirect
Copy link
Member

indirect commented Aug 9, 2016

As discussed in #4571, it's confusing that bundler says "or available on this machine" when the bundle is installed using --path mode. We should stop printing it under those circumstances. While we're at it, it would be cool to add "or in gems cached in vendor/cache" if the cache exists.

@segiddins
Copy link
Member

This just uses the #to_s of the source. Keep in mind I changed that in the 2.0 branch.

homu added a commit that referenced this issue Oct 3, 2016
4854 gemnotfound error

Fixes broken test

Wanting to help out, I was on the outlook for something easy to fix in bundler. I stumbled upon this issue #4854, which was already tackled by @b-ggs but somehow not merged yet. I went on to check whether I could do something. Here's what I've come up with:

@b-ggs' PR included everything to solve the issue, but introduced the use of ```Bundler.app_cache``` in the resolver. This works out just fine until you run ```bundle plugin install```, which does not seem to require a Gemfile. ```Bundler.app_cache``` however calls ```root```,  which then again tries to find a Gemfile. This obviously fails and raises a ```GemfileNotFound``` exception. The error message  "Could not locate Gemfile or .bundle/ directory" starts very similar to the one expected in the failing test ("Could not find"). This however, is a completely different error.

The solution is now is to rescue the GemfileNotFound error when it comes up to here.

All credit for solving the issue goes to @b-ggs and his PR here: #4865
bundlerbot added a commit that referenced this issue Dec 24, 2016
4854 gemnotfound error

Fixes broken test

Wanting to help out, I was on the outlook for something easy to fix in bundler. I stumbled upon this issue #4854, which was already tackled by @b-ggs but somehow not merged yet. I went on to check whether I could do something. Here's what I've come up with:

@b-ggs' PR included everything to solve the issue, but introduced the use of `Bundler.app_cache` in the resolver. This works out just fine until you run `bundle plugin install`, which does not seem to require a Gemfile. `Bundler.app_cache` however calls `root`,  which then again tries to find a Gemfile. This obviously fails and raises a `GemfileNotFound` exception. The error message  "Could not locate Gemfile or .bundle/ directory" starts very similar to the one expected in the failing test ("Could not find"). This however, is a completely different error.

The solution is now is to rescue the GemfileNotFound error when it comes up to here.

All credit for solving the issue goes to @b-ggs and his PR here: #4865
bundlerbot added a commit that referenced this issue Dec 24, 2016
4854 gemnotfound error

Fixes broken test

Wanting to help out, I was on the outlook for something easy to fix in bundler. I stumbled upon this issue #4854, which was already tackled by @b-ggs but somehow not merged yet. I went on to check whether I could do something. Here's what I've come up with:

@b-ggs' PR included everything to solve the issue, but introduced the use of `Bundler.app_cache` in the resolver. This works out just fine until you run `bundle plugin install`, which does not seem to require a Gemfile. `Bundler.app_cache` however calls `root`,  which then again tries to find a Gemfile. This obviously fails and raises a `GemfileNotFound` exception. The error message  "Could not locate Gemfile or .bundle/ directory" starts very similar to the one expected in the failing test ("Could not find"). This however, is a completely different error.

The solution is now is to rescue the GemfileNotFound error when it comes up to here.

All credit for solving the issue goes to @b-ggs and his PR here: #4865
@nickborromeo
Copy link

@indirect @segiddins can this issue be closed? 😄

@segiddins
Copy link
Member

I believe so 👍🏻

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

4 participants