【发布时间】:2012-05-23 17:30:48
【问题描述】:
32 位的 rvm 安装正常。输出甚至使它看起来像 yaml 安装得很好
Kyles-MacBook-Air:~ kpeyton$ export rvm_archflags='-arch i386'
Kyles-MacBook-Air:~ kpeyton$ export rvm_architectures='i386'
Kyles-MacBook-Air:~ kpeyton$ export rvm_configure_flags=--target=i686-apple-darwin11
Kyles-MacBook-Air:~ kpeyton$ rvm install ruby-1.9.3-p125 --32 --patch osx-arch-fix -n i386
Fetching yaml-0.1.4.tar.gz to /Users/kpeyton/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/kpeyton/.rvm/src
Configuring yaml in /Users/kpeyton/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/kpeyton/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/kpeyton/.rvm/usr
Installing Ruby from source to: /Users/kpeyton/.rvm/rubies/ruby-1.9.3-p125-i386, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125-i386 - #fetching
ruby-1.9.3-p125-i386 - #extracting ruby-1.9.3-p125 to /Users/kpeyton/.rvm/src/ruby-1.9.3-p125-i386
ruby-1.9.3-p125-i386 - #extracted to /Users/kpeyton/.rvm/src/ruby-1.9.3-p125-i386
Applying patch 'osx-arch-fix' (located at /Users/kpeyton/.rvm/patches/ruby/1.9.3/p125/osx-arch-fix.patch)
Applying patch 'xcode-debugopt-fix-r34840' (located at /Users/kpeyton/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff)
ruby-1.9.3-p125-i386 - #autoreconf
ruby-1.9.3-p125-i386 - #configuring
ruby-1.9.3-p125-i386 - #compiling
ruby-1.9.3-p125-i386 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p125-i386 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p125-i386 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p125-i386 - #importing default gemsets (/Users/kpeyton/.rvm/gemsets/)
Install of ruby-1.9.3-p125-i386 - #complete
但是当我尝试使用 irb 并需要 'yaml' 时,我收到关于未安装 libyaml 的错误:
Kyles-MacBook-Air:~ kpeyton$ rvm use ruby-1.9.3-p125-i386
Using /Users/kpeyton/.rvm/gems/ruby-1.9.3-p125-i386
Kyles-MacBook-Air:~ kpeyton$ irb
1.9.3p125 :001 > require 'yaml'
/Users/kpeyton/.rvm/rubies/ruby-1.9.3-p125-i386/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
=> true
谁能告诉我该怎么做?
【问题讨论】:
-
为什么不使用 64 位 ruby/libyaml:
rm -rf $rvm_path/usr; rvm reinstall 1.9.3 --64 -
由于工作原因,我必须使用 Oracle,而 oracle 即时客户端无法在 64 位 Lion OSX 上运行。
-
看看这个github.com/wayneeseguin/rvm/blob/master/scripts/functions/… ...这是 RVM 之前用于 ruby 1.8 的代码 ...但是 ruby 1.9 为架构引入了更简单的开关,但它们不适用于 libyaml - 也许应该为它添加一些新的东西