2

我安装的 ruby​​ 1.9.3 一切正常。

$ rbenv global 1.9.3-p385
$ gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
$ gem check
$ 

但是,在我安装 ruby​​ 2.0.0 后rbenv install,出现了一些奇怪的错误消息gem check

$ rbenv install 2.0.0-p0
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...
Installed openssl-1.0.1e to /Users/gogao/.rbenv/versions/2.0.0-p0

Downloading ruby-2.0.0-p0.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
Installing ruby-2.0.0-p0...
Installed ruby-2.0.0-p0 to /Users/gogao/.rbenv/versions/2.0.0-p0

$ rbenv global 2.0.0-p0
$ rbenv rehash
$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
$ gem check
Checking gems...

bigdecimal-1.2.0.gem has 1 problems
  bigdecimal-1.2.0:
    Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/bigdecimal-1.2.0

io-console-0.4.2.gem has 1 problems
  io-console-0.4.2:
    Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/io-console-0.4.2

json-1.7.7.gem has 1 problems
  json-1.7.7:
    Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7

minitest-4.3.2.gem has 1 problems
  minitest-4.3.2:
    Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/minitest-4.3.2

psych-2.0.0.gem has 1 problems
  psych-2.0.0:
    Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/psych-2.0.0

rake-0.9.6.gem has 2 problems
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem:
    missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rake-0.9.6.gemspec:
    Spec file missing for installed gem

rdoc-4.0.0.gem has 2 problems
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem:
    missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rdoc-4.0.0.gemspec:
    Spec file missing for installed gem

test-unit-2.0.0.0.gem has 2 problems
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem:
    missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem
  /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/test-unit-2.0.0.0.gemspec:
    Spec file missing for installed gem

$

这是一个已知的错误吗?还是我做错了什么?

4

2 回答 2

0

对于 Ruby 2.0.0-p0,我也从gem check. 但是,我在运行时对这些 gem 没有任何问题。我怀疑这可能是check2.0.0 中 Rubygems 命令的错误。

于 2013-04-05T20:58:00.990 回答
0

我有类似的错误。将选项传递给编译器修复安装。在使用 Homebrew 安装 readline 和 openssl 之前。

RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.0.0-p0

来自原始帖子的更多信息

于 2013-06-18T12:48:32.697 回答