我把一个宝石推到了rubygems.org,当我做'宝石安装(宝石)'我得到这个错误:
ERROR: While executing gem ... (NameError)
uninitialized constant Psych::Syck
Run Code Online (Sandbox Code Playgroud)
我可以做一个'gem build(gem).gemspec'来生成一个本地gem,然后gem install(gem).gem并且安装得很好.我也可以将gem放入我的Rails'应用程序的Gemfile中,并指向Github repo,这也可以.我已经尝试安装gem(来自rubygems.org的多台计算机上,他们都得到了相同的错误.
我不知道从rubygems.org完成安装失败的原因是什么,但是当我在本地生成它时却没有.我正在使用珠宝商将宝石推到rubygems.org.
我得到的具体错误是:uninitialized constant Psych::Syck (NameError)在进行捆绑安装时.
安装simplecov(awesome code coverage tool)版本0.5.0时发生了这种情况.在Ubuntu 11.04中工作并使用RVM.
修正了问题 gem update --system
这会更新rubygems并产生以下输出:
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5373 次 |
| 最近记录: |