开发工具 rbenv 安装 Ruby 2.0.0-p0

linjunpop · 2013年02月26日 · 最后由 cao7113 回复于 2014年01月09日 · 5068 次阅读

按照这个安装搞定:

http://qiita.com/items/05a09296f3633cadac3f

用 brew 装 rbenv 和 ruby-build 然后装 2.0.0-p0 的看这里: https://github.com/sstephenson/ruby-build/issues/304#issuecomment-14026228

0 楼的那个没有必要。没有必要安装 openssl。rbenv 自己会安装。 关键是 ruby-build 要更新到最新。具体理由见 1L。

MAC 下 readline 可能需要先安装这个插件 https://github.com/tpope/rbenv-readline

#3 楼 @doitian 刚安装,用 git 安装的 rbenv,不需要 readline

我也用 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

$

需要 登录 后方可回复, 如果你还没有账号请 注册新账号