2013-02-26 9 views
16

Ho eseguito gem update --system pensando che avrebbe risolto un problema che stavo avendo e ora non riesco a eseguire rails server. Non verrà caricato e, invece, continuo ad ottenere quanto segue. Qualcuno può dirmi come annullare questo e tornare indietro prima di eseguire l'aggiornamento?

ho già corse git checkout, ma il problema persiste ...

/usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError) 
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems' 
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints' 
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:14:in `setup' 
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup' 
from /usr/local/rvm/gems/[email protected]/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:66:in `setup' 
from /usr/local/rvm/gems/[email protected]/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:78:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require' 
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require' 
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require' 
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>' 
+0

Avete bisogno di aggiornare bundler? –

risposta

15

sembra la versione più recente di Rubygems è bacato.

Devi solo tornare a una versione precedente con il seguente comando e tutto dovrebbe funzionare bene:

gem update --system 1.8.24 
+2

Anziché eseguire il downgrade dei rubygems, penso che sia una buona idea aggiornare bundler per l'altra risposta :) – Chris

+2

Sono d'accordo, ecco perché ho votato l'altra risposta! Dovrei modificare anche il mio? –

+0

@DanielRistic, non importa. Ho provato prima Bruno ma non ho funzionato nel mio caso. Il tuo ha funzionato come un incantesimo. Upvoting sia le risposte che la domanda. –

38

Ho avuto lo stesso problema di oggi. Aggiornamento bundler alla versione più recente ha risolto il problema:

gem update bundler 

E se si esegue rbenv

rbenv rehash 
+0

Questo ha funzionato per me dopo aver visto un errore simile quando cercavo di convincere RubyMine a eseguire il debug di uno script ruby ​​(errore come: stub_source_index170 ': costante non inizializzata Gem :: SourceIndex (NameError)). Solo gem update bundler l'ha risolto. – Mason

Problemi correlati