这里有一篇两年前的博客文章解释了如何修复 Nokogiri 附带的错误“你必须先安装开发工具”错误,如果您在安装 RVM 后升级到 Mountain Lion,就会出现这个问题。在博客文章中,他说你必须做
rvm update head
rvm --force install 1.9.2
gem install bundle
## in your rails app
bundle
Installing nokogiri (1.4.2) with native extensions
...
rvm update head
现在已更改为rvm get head
. 然而,在那之后我盲目地做了
rvm --force install 1.9.2
并收到此错误消息
rvm --force install 1.9.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
[1]: http://www.fakingfantastic.com/2010/11/26 /fixing-the-you-have-to-install-development-tools-first-error-with-nokogiri/
换句话说,它引导我回到同一篇博客文章。
看着RVM网站,我盲目地做了
rvm install 1.9.2
我收到了这个错误
未安装 ruby-1.9.2-p320。要安装:'rvm install ruby-1.9.2-p320'
按照它的说明,我做了 rvm install ruby-1.9.2-p320 并得到了相同的二进制文件错误
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
谁能提供一些指导