2010-04-23 123 views
0

我被這個問題困住了。osx rvm ruby​​ 1.8.7 nokogiri 1.4.1 - 錯誤:無法構建gem原生擴展

cat ~/.rvm/gems/ruby-1.8.7-p249/gems/nokogiri-1.4.1/ext/nokogiri/mkmf.log 

給出了這樣的錯誤(限幅)

conftest.c:3: error: 'xmlParseDoc' undeclared (first use in this function) 
conftest.c:3: error: (Each undeclared identifier is reported only once 
conftest.c:3: error: for each function it appears in.) 

對於被在系統中找到幾個庫。

如果我手動進入

~/.rvm/gems/ruby-1.8.7-p249/gems/nokogiri-1.4.1/ext/nokogiri/ 

編譯並安裝一切順利

ruby extconf.rb 
make 
make install 
mkdir -p /Users/tommasop/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/i686-darwin9.8.0/nokogiri 
/usr/bin/install -c -m 0755 nokogiri.bundle /Users/tommasop/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/i686-darwin9.8.0/nokogiri 

除了腳本/服務器:

→ script/server --debugger 
=> Booting Mongrel 
=> Rails 2.3.5 application starting on http://0.0.0.0:3000 
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement 
The following gems have native components that need to be built 
    nokogiri 

You're running: 
    ruby 1.8.7.249 at /Users/tommasop/.rvm/rubies/ruby-1.8.7-p249/bin/ruby 
    rubygems 1.3.6 at /Users/tommasop/.rvm/gems/ruby-1.8.7-p249, /Users/tommasop/.rvm/gems/ruby-1.8.7-p249%global 

Run `rake gems:build` to build the unbuilt gems. 

任何幫助,不勝感激!

回答

相關問題