nokogiri not installing correctly for ruby-1.9.1
I have recently installedHi everyone,
I have recently installed ruby-1.9.1 using rvm. I have tried installing nokogiri following this guide:
https://github.com/tenderlove/nokogiri/wiki/what-to-do-if-libxml2-is-being-a-jerk
but I am still getting the foll开发者_JS百科owing error once the gem is installed:
HI. You're using libxml2 version 2.6.16 which is over 4 years old and has plenty of bugs. We suggest that for maximum HTML/XML parsing pleasure, you upgrade your version of libxml2 and re-install nokogiri. If you like using libxml2 version 2.6.16, but don't like this warning, please define the constant I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 before requring nokogiri.
I have also ensured that libxml2 I have installed in my leopard operating system is greater than 2.6:
$fink list libxml2
Information about 11516 packages read in 2 seconds.
i libxml2 2.7.8-102 XML parsing library, version 2
i libxml2-bin 2.7.8-102 XML parsing library, version 2
(i) libxml2-py25 2.7.8-1 Python bindings for libxml2 library
libxml2-py26 2.7.8-1 Python bindings for libxml2 library
libxml2-py27 2.7.8-1 Python bindings for libxml2 library
libxml2-rb18 0.5.4-1 Ruby bindings for libxml2
i libxml2-shlibs 2.7.8-102 XML parsing library, version 2
So, either nokogiri isn't getting fully rebuilt, or it is but it's getting rebuilt against another version that's still living on your system. The easiest thing is to try is gem uninstall nokogiri && gem clean && gem install nokogiri
. Be sure to uninstall every version if you have more than one.
The next thing is to try to ensure that the gem is actually being built against the version of libxml listed by fink. Try removing other versions (perhaps installed by MacPorts or Homebrew?) and rebuilding the gem.
If that doesn't help, we'll need to try troubleshooting the dynamic linker paths. I'm not so up on how to do that on OS X, so let's see if any of the above solutions help first.
精彩评论