2009-02-19 18 views
10

Sto cercando di installare un gioiello come questo:Come posso forzare gioiello per l'aggiornamento a 1.3.1 gioiello

C:\InstantRails\rails_apps\foodmarksthespot>ruby script/plugin install git://github.com/lazyatom/engines.git 

che restituisce questo messaggio:

Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. 

Ma quando provo ad aggiornare utilizzando:

gem update --system 

dice:

Updating RubyGems 
Nothing to update 

Questo è su Windows. Come posso forzare l'aggiornamento del sistema a una versione specifica?

risposta

16

http://rubyforge.org/forum/forum.php?forum_id=28071

Da lì:

 
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no 
rubygems-update installed. You will need to follow the second set of update 
instructions if you see "Nothing to update". 

If you have an older version of RubyGems installed, then you can still 
do it in two steps: 

$ gem install rubygems-update (again, might need to be admin/root) 
$ update_rubygems (... here too) 
+0

Ho rubygems 1.0.1 e l'ultima soluzione funziona con me. Voto UP. :) – ecleel

0

Cosa ottieni se esegui gem --version in cmd? Sembra che l'eseguibile gem che stai usando in cmd non sia lo stesso che Rails sta usando.

+0

gem --version restituisce 1.2.0. Significa includerlo nel messaggio. –

1

Se si desidera installare una versione specifica quindi provare come il seguente.

$gem install -v=version_number package_name

Per esempio nel tuo caso dovrebbe essere,

$gem install -v=1.3.1 RubyGems

2

Per chiunque inciampo su questa domanda di recente: Al fine di installare una versione più vecchia specifica di RubyGems (probabilmente per mantenere un applicazione legacy, come ho fatto) ho dovuto fare quanto segue, in quanto le risposte precedenti non funzionavano:

$ gem install -v 1.3.7 rubygems-update && \  
$ ruby `gem env gemdir`/gems/rubygems-update-1.3.7/setup.rb  

$ gem -v 
1.3.7 

Come documentato qui: http://www.chentianwen.net/wordpress/2011/05/24/how-to-update-rubygems-to-a-specific-version/

Problemi correlati