用 brew 装 rbenv 和 ruby-build 然后装 2.0.0-p0 的看这里: https://github.com/sstephenson/ruby-build/issues/304#issuecomment-14026228
我也用 rbenv 装了 2.0.0-p0,但是奇怪的是,那一堆 default gems 在做 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
$