- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Description
Describe the problem as clearly as you can
I started building a very simple plugin using as reference this guide, after push and test I notice that when we bundle install them from Gemfile (without git or path), it keep saying "installing" every run.
Did you try upgrading rubygems & bundler?
Yes, I tested on Bundler 2.4.12 and Rubygems 3.4.12
Post steps to reproduce the problem
Just add any plugin to your Rails App gemfile as specified on the early guide, ex.:
Gemfile
plugin 'bundle_filter'
plugin 'extended_bundler-errors'
Which command did you run?
bundle or bundle install
What were you expecting to happen?
plugins are already installed, but the bundler tries install again
What actually happened?
"Installing plugin x" even if is already installed
Where is the problem?
I did a small search and found the problem probably here where Bundler keep installing plugins if they're already installed, what makes the bug.
How solve the problem?
I actually tried few changes on my own version of Bundler gem 2.4.12, looks very simple to fix but since I don't know if could have any impact, prefer wait you guys to take a look. I solved the problem just checking if there is plugins not installed yet before actually install someone, here:
plugins = definition.dependencies.map(&:name).reject { |p| index.installed? p }
return if plugins.empty?
installed_specs = Installer.new.install_definition(definition)
Please take a look and say if makes sense :)
If not included with the output of your command, run bundle env and paste the output below
Bundler             2.4.12
  Platforms         ruby, x86_64-darwin-20
Ruby                2.7.2p137 (2020-10-01 revision 5445e0435260b449decf2ac16f9d09bae3cafe72) [x86_64-darwin-20]
  Full Path         /Users/dfop/.rvm/rubies/ruby-2.7.2/bin/ruby
  Config Dir        /Users/dfop/.rvm/rubies/ruby-2.7.2/etc
RubyGems            3.4.12
  Gem Home          /Users/dfop/.rvm/gems/ruby-2.7.2@my-test-rails
  Gem Path          /Users/dfop/.rvm/gems/ruby-2.7.2@my-test-rails:/Users/dfop/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0
  User Home         /Users/dfop
  User Path         /Users/dfop/.gem/ruby/2.7.0
  Bin Dir           /Users/dfop/.rvm/gems/ruby-2.7.2@my-test-rails/bin
Tools               
  Git               2.40.0
  RVM               1.29.12-next (master)
  rbenv             not installed
  chruby            not installed
  rubygems-bundler  (1.4.5)