Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x00005633f09a9000> (NoMethodError)

I have made a pull of a project that I have in my work and when I tried to run rails db:migrate, the terminal request to install "Bundler 2" so I do it.

Now, when I tried to do rails db:migrate I have the following error:

/home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84:in `setup': undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x00005633f09a9000> (NoMethodError)
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124:in `check'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:168:in `require'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:178:in `require'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/executable-hooks-1.5.0/lib/executable-hooks/hooks.rb:50:in `block in run'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/executable-hooks-1.5.0/lib/executable-hooks/hooks.rb:49:in `each'
    from /home/acartesc/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/executable-hooks-1.5.0/lib/executable-hooks/hooks.rb:49:in `run'
    from /home/acartesc/.rvm/gems/ruby-2.4.3/bin/ruby_executable_hooks:10:in `<main>'

I appreciate your help!

like image 699
Acartes Avatar asked Dec 17 '19 01:12

Acartes


1 Answers

gem uninstall rubygems-bundler

works for me I am using bundler 2.1.0

REF: https://github.com/bundler/bundler/issues/7492

When showing

ERROR:  While executing gem ... (Gem::InstallError)
    rubygems-bundler is not installed in GEM_HOME, try:
    gem uninstall -i /Users/xxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/gems/2.5.0 rubygems-bundler

Please run

gem uninstall -i /Users/xxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/gems/2.5.0 rubygems-bundler
like image 169
rokugou Avatar answered Nov 06 '22 18:11

rokugou