Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does the information rendered by bundle info come from? #4954

Closed
caasssandre opened this issue Oct 3, 2021 Discussed in #4949 · 1 comment · Fixed by #4974
Closed

Where does the information rendered by bundle info come from? #4954

caasssandre opened this issue Oct 3, 2021 Discussed in #4949 · 1 comment · Fixed by #4974

Comments

@caasssandre
Copy link

caasssandre commented Oct 3, 2021

Discussed in #4949

Unexpected behaviour to reproduce:

  1. In a Rails app, find the directory where gems are being installed. In mine, it is there: /bundle/ruby/2.7.0/gems
  2. List the gems and make note of specific gem of you r choosing, I'll work with addressfinder
  3. Run bundle info your_gem_name, you should get something like that: Screen Shot 2021-10-01 at 2 43 23 PM
  4. Delete/remove the gem from the gem directory
  5. Run bundle info your_gem_name again, you will see no difference to the screenshot above
  6. Now list all the gems again, you will see that the gem you moved is not there anymore but bundle info still tells you that the path to the gem is unchanged.
  7. If you try to run your app (assuming it is using the gem) it will be broken
  8. If you try to run bundle install nothing will happen, bundler seems to think that the gem is installed, even though it isn't there anymore.
  9. To return to a working state of your app, run bundle install --force

Expected behaviour

  1. Once the gem has been deleted from the gems directory, bundle info gem_name should return "The gem #{gem_name} has been deleted. It was installed at: #{path}"
  2. bundle install should check whether all gems exist locally and if not, trigger a reinstall

Additional notes:

  • This behaviour can be reproduced in a skeleton app with a single folder with two files: Gemfile and Gemfile.lock and a single gem
  • Bundler version 2.2.28
  • ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-darwin19]

Cheers 🙏

@deivid-rodriguez
Copy link
Member

Hello @caasssandre, I confirmed the behavior you're seeing and it's indeed unexpected.

I'll be creating two PRs to fix the two bugs being reported here 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants