metodo non definito `plain_specs 'per # <Bundler :: RubygemsIntegrazione: 0x00005633f09a9000> (NoMethodError)


13

Ho fatto un tiro di un progetto che ho nel mio lavoro e quando ho provato a eseguire rails db:migrate, il terminale richiede di installare "Bundler 2", quindi lo faccio.

Ora, quando ho provato a fare rails db:migrateho il seguente errore:

/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>'

Apprezzo il vostro aiuto!


Il problema sembra simile a quello descritto qui: stackoverflow.com/questions/24833123/… che viene risolto rigenerando i binstub.
sergio

Rigenerare i binstub non ha aiutato. Ho declassato il bundler alla 2.0.2 e ora tutto funziona bene. Immagino sia un bug bundler 2.1.0?
Etere,

Risposte:


14
gem uninstall rubygems-bundler

funziona per me sto usando bundler 2.1.0

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

Quando mostra

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

Per favore, corri

gem uninstall -i /Users/xxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/gems/2.5.0 rubygems-bundler

0

Qual è la tua versione in rubino? Ho avuto lo stesso problema.

La mia versione ruby ​​è 2.6.3e il mio bundle non ha funzionato in questa versione ruby. (Il pacchetto è già aggiornato a 2.0.2),

Quindi ho declassato il mio pacchetto a Verion 1.17.3e ha funzionato.

Io con questa soluzione ti aiuterò.


0

Assicurati di utilizzare una versione di ruby ​​supportata. Mi sono imbattuto in questo quando ho provato ad usare jruby-9.2.9. Passando da jruby a ruby ​​il problema è andato via.

rvm use ruby-2.5.1

0

È un bug con la versione del bundler 2.1.0.pre.2

Ho smontato la gemma del bundler e ho installato una versione diversa della gemma del bundler

$ gem uninstall bundler
$ gem install bundler -v 2.0.2

Dovrebbe funzionare.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.