0

I have upgraded to Mavericks OS X and I started getting this warning.

➜ d3 git:(master) rspec

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.0

➜ d3 git:(master) ✗ nokogiri -v

Nokogiri (1.6.0)

---
warnings: []
nokogiri: 1.6.0
ruby:
  version: 1.9.3
  platform: x86_64-darwin13.0.0
  description: ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.0]
  engine: ruby
libxml:
  binding: extension
  source: packaged
  libxml2_path: /Users/tyler/.rvm/gems/ruby-1.9.3-p448@d3/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0
  libxslt_path: /Users/tyler/.rvm/gems/ruby-1.9.3-p448@d3/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26
  compiled: 2.8.0
  loaded: 2.8.0
Tyler
  • 678
  • 7
  • 22

1 Answers1

0

This problem has already a lot of answers on StackOverflow. Basically you just have to uninstall/reinstall the gem and everything will be ok. If you want an older version of libxml2 then you'll have a hard time (as I currently do).

Just so you now, "nokogiri -v" won't give you the same loaded version as used when loading the gem from ruby or rails, I don't know why. This is the piece of code I use to know if I'm in the correct versions:

puts "nokogiri: #{Nokogiri::LIBXML_VERSION} / #{Nokogiri::LIBXML_PARSER_VERSION}"

It uses the same constants nokogiri uses internally to check if versions match.

jbbarth
  • 712
  • 6
  • 6