安装Ruby 1.9.3

时间:2012-04-15 22:09:05

标签: ruby macos rvm

规格:XCode 4.3.2,Mac OS X 10.7.3,RVM 1.12.3(稳定)。

我真的需要帮助,所以感激不尽。

我安装了Ruby 1.8.7,然后需要更新到1.9.3,所以我找到了RVM。我安装了RVM,然后尝试更新,结果就是这样:

rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/myname/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/myname/.rvm/src
Error running 'tar xmzf /Users/myname/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/myname/.rvm/src ', please read /Users/myname/.rvm/log/ruby-1.9.3-p125/yaml/extract.log
Configuring yaml in /Users/myname/.rvm/src/yaml-0.1.4.
Error running ' ./configure
    --prefix="/Users/myname/.rvm/usr" ', please read /Users/myname/.rvm/log/ruby-1.9.3-p125/yaml/configure.log Compiling yaml in /Users/myname/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/myname/.rvm/log/ruby-1.9.3-p125/yaml/make.log

Database file /Users/myname/.rvm/config/packages does not exist.

Installing Ruby from source to: /Users/myname/.rvm/rubies/ruby-1.9.3-p125,
this may take a while depending on your cpu(s)...

ruby-1.9.3-p125
- #fetching ruby-1.9.3-p125
- #extracted to /Users/myname/.rvm/src/ruby-1.9.3-p125 (already extracted) ruby-1.9.3-p125
- #configuring Error running ' ./configure
    --prefix=/Users/myname/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/myname/.rvm/usr ',

please read /Users/myname/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/myname/.rvm/rubies/*/bin/ruby: No such file or directory

3 个答案:

答案 0 :(得分:3)

请安装osx-gcc-installer 10.7

阅读并遵循要求:

rvm requirements

最后重新安装ruby:

rvm reinstall 1.9.3

答案 1 :(得分:0)

我强烈建议使用带有ruby-build的rbenv来管理你的红宝石。

它比rvm简单得多,也不那么神奇。

答案 2 :(得分:0)

您应该关注此博客并安装任何版本的ruby

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/