2011-07-06 13 views
5

ho spinto un gioiello fino a rubygems.org, e quando faccio un 'gem install (GEM)' ottengo questo errore:non inizializzata costante Psych :: syck su gem install

ERROR: While executing gem ... (NameError) 
uninitialized constant Psych::Syck 

posso fare un 'gem build (gem) .gemspec' per generare una gem locale e poi gem install (gem) .gem e che si installa bene. Posso anche inserire la gemma nel Gemfile dell'app di Rails con un puntatore al repository Github e funzionerà anche. Ho provato a installare la gemma (da rubygems.org su più computer e tutti hanno lo stesso errore.

Sono fuori di idee su cosa può causare il fallimento dell'installazione quando eseguito da rubygems.org ma non quando I generare localmente sto usando gioielliere per spingere la gemma fino a rubygems.org

risposta

6

L'errore specifico ho ottenuto è stato: uninitialized constant Psych::Syck (NameError) quando si fa installare bundle.

Questo è accaduto durante l'installazione di simplecov (awesome code coverage tool) versione 0.5.0. Lavorare in Ubuntu 11.04 e utilizzare RVM.

Risolto il problema con gem update --system

Ciò aggiorna RubyGems e prodotto il seguente output:

Updating rubygems-update 
Fetching: rubygems-update-1.8.10.gem (100%) 
Successfully installed rubygems-update-1.8.10 
Installing RubyGems 1.8.10 
RubyGems 1.8.10 installed 

== 1.8.10/2011-08-25 

RubyGems 1.8.10 contains a security fix that prevents malicious gems from 
executing code when their specification is loaded. See 
https://github.com/rubygems/rubygems/pull/165 for details. 

* 5 bug fixes: 

* RubyGems escapes strings in ruby-format specs using #dump instead of #to_s 
    and %q to prevent code injection. Issue #165 by Postmodern 
* RubyGems attempt to activate the psych gem now to obtain bugfixes from 
    psych. 
* Gem.dir has been restored to the front of Gem.path. Fixes remaining 
    problem with Issue #115 
* Fixed Syck DefaultKey infecting ruby-format specifications. 
* `gem uninstall a b` no longer stops if gem "a" is not installed. 


------------------------------------------------------------------------------ 

RubyGems installed the following executables: 
    /home/baller/.rvm/rubies/ruby-1.9.2-p180/bin/gem 

RubyGems system software updated 
3

La soluzione sarebbe quella di eseguire il comando in basso nel vostro terminale:

gem update --system 

E ' è un bug nella versione gem di sistema che causa questo problema. Questo ha funzionato per me.

Problemi correlati