rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 1.99k forks source link

Bundler throwing error #7488

Closed RDIL closed 4 years ago

RDIL commented 4 years ago

Hi, I haven't used bundler since october, and I just updated it, and tried to run: bundler install

However, it threw:

Traceback (most recent call last):
        6: from /workspace/.rvm/bin/ruby_executable_hooks:10:in `<main>'
        5: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
        4: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
        3: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
        2: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
        1: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rubygems-bundler/noexec (LoadError)
        10: from /workspace/.rvm/bin/ruby_executable_hooks:10:in `<main>'
         9: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
         8: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
         7: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
         6: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
         5: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
         4: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
         3: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
         2: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
         1: from /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124:in `check'
/home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84:in `setup': undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x00005591d43a8a98> (NoMethodError)

Has something changed I should be aware of?

silva96 commented 4 years ago

facing the same issue

bundler (2.1.0)
bundler-unload (1.0.2)
rubygems-bundler (1.4.5)
rubygems-update (3.1.1)

to solve it for now, I had to downgrade rubygems, rubygems-update and bundler to the versions I had previously

gem uninstall bundler -v 2.1.0
gem install bundler -v 2.0.2

rvm install rubygems 3.0.3 --force
gem uninstall rubygems-update -v 3.1.1
gem install rubygems-update -v 3.0.3

Obviously this does not fix the real problem, but is a solution for now.

deivid-rodriguez commented 4 years ago

The rubygems-bundler gem monkeypatches rubygems and bundler in unexpected ways, and it sounds like the latest releases broke it. A workaround is to remove it, since its own README states that the gem is no longer necessary.

I'll request the RVM team to not install this gem by default.

RDIL commented 4 years ago

One thing to note @deivid-rodriguez, everything seems fine with bundle install, but bundler install breaks 😕

its actually really annoying because just bundle looks dull, so I prefer typing bundler

deivid-rodriguez commented 4 years ago

Even after running gem uninstall rubygems-bundler?

RDIL commented 4 years ago

Haven't tested it yet, just saying that bundle works, whereas bundler doesn't.

deivid-rodriguez commented 4 years ago

Ok, thanks @RDIL. Please report back, I think gem uninstall rubygems-bundler should work. Regarding bundler not working, I'll have a look.

RDIL commented 4 years ago

@deivid-rodriguez

ERROR:  While executing gem ... (Gem::InstallError)
    rubygems-bundler is not installed in GEM_HOME, try:
        gem uninstall -i /home/gitpod/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0 rubygems-bundler
RDIL commented 4 years ago

Oh wait that did work

jasondborneman commented 4 years ago

I'm getting this same error, rubygems-bundler is not installed in my gemset being used, nor is it in my Gemfile. This problem just started for me today, but could have been a problem anytime since Friday since today is the first day since THursday that I ran this project.

I'll add a note to this that also for me bundle install works but bundler does NOT. It's also breaking Rails, in that any rails command I run fails with this error. It's how I was exposed to this problem.

jasondborneman commented 4 years ago

Ah hah! I had to do the following:

$ rvm @global
$ gem uninstall rubygems-bundler
$ rvm gemset use MYGEMSET

That seems to have solved the problem.

Now I need to figure out how to apply this fix to my AWS machines that are failing because of this as well.

fzakaria commented 4 years ago

I hit this with latest bundler also.

deivid-rodriguez commented 4 years ago

Could you try #7498 and see if it fixes things for you?

pedrofurtado commented 4 years ago

Any news about this issue? Is a great idea to release a minor version with this bugfix 🤝