2011-07-06 2 views
5

をインストールし、私はrubygems.orgする宝石を押し上げ、と私は「宝石(宝石)をインストールする」ないとき、私はこのエラーを取得:初期化されていない一定のサイコ::はSyckが宝石に

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

私にできることローカルのgemを生成するために 'gem build(gem).gemspec'を実行してから、gem install(gem).gemをインストールしてください。 Githubリポジトリへのポインタを使ってRailsのアプリケーションのGemfileに宝石を入れることもできます。私は宝石をインストールしようとしましたが(複数のコンピュータにrubygems.orgからインストールしてみましたが、同じエラーが表示されます)

ruby​​gems.orgからのインストールで失敗した原因は何ですか? 。私はrubygems.orgする宝石を押し上げるジュエラーを使用していますローカルで生成

答えて

6

私が得た具体的なエラーは:uninitialized constant Psych::Syck (NameError)バンドルをインストールするとき。

これは、simplecov(素晴らしいコードカバレッジツール)バージョン0.5.0をインストールするときに起こりました。 Ubuntu 11.04で作業し、RVMを使用する。

これはRubyGemsのを更新し、次の出力を生成gem update --system

で問題が修正されました:

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

ソリューションは、あなたのターミナルで以下のコマンドを実行するために、次のようになります。

gem update --system 

それは、この問題を引き起こすシステムの宝石のバグです。これは私のために働いた。

関連する問題