I thought for sure now that libxml2 and libxslt are packaged with nokogiri that this problem (and
http://nokogiri.org/tutorials/installing_nokogiri.html,
http://dreamconception.com/tech/fix-nokogiri-install-issue-on-mac-os-x-10-9/ and
https://github.com/sparklemotion/nokogiri/issues/742) was a thing of the past. But, here I am, unable to get nokogiri to work. This same code worked on an old machine of mine, and on a coworkers...so I think I'm dealing with an installation issue, but at this point I'm not sure.
Here are the details that I think are relevant:
$ bundle exec nokogiri -v
# Nokogiri (1.6.1)
---
warnings: []
nokogiri: 1.6.1
ruby:
version: 2.0.0
platform: x86_64-darwin13.1.0
description: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.1.0]
engine: ruby
libxml:
binding: extension
source: packaged
libxml2_path: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.1.0/libxml2/2.8.0
libxslt_path: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.1.0/libxslt/1.1.26
compiled: 2.8.0
loaded: 2.8.0
$ bundle exec rails console
Loading development environment (Rails 3.2.17)
Frame number: 0/3
[1] pry(main)> load 'nokogiri_install_hell.rb'
[]
=> true
Here's a snippet from the dynamic library info from invoking the previous command with DYLD_PRINT_LIBRARIES=1:
dyld: loaded: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/extensions/x86_64-darwin-13/2.0.0/nokogiri-1.6.1/nokogiri/nokogiri.bundle
dyld: loaded: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.1.0/libxslt/1.1.26/lib/libexslt.0.dylib
dyld: loaded: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.1.0/libxslt/1.1.26/lib/libxslt.1.dylib
dyld: loaded: /Users/david.byron/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.1.0/libxml2/2.8.0/lib/libxml2.2.dylib
dyld: loaded: /usr/lib/libiconv.2.dylib
$ ls -l /usr/lib/libiconv.*
lrwxr-xr-x 1 root wheel 16 Nov 15 12:23 /usr/lib/libiconv.2.4.0.dylib -> libiconv.2.dylib
-r-xr-xr-x 1 root wheel 2088992 Nov 15 12:22 /usr/lib/libiconv.2.dylib
lrwxr-xr-x 1 root wheel 20 Nov 15 12:23 /usr/lib/libiconv.dylib -> libiconv.2.4.0.dylib
And just in case:
$ brew list libxml2
Error: No such keg: /usr/local/Cellar/libxml2
$ brew list libxslt
Error: No such keg: /usr/local/Cellar/libxslt
I would be most grateful if someone could take a look and give me a hand. If there is more info about my system I need to provide to work this out, please let me know.
Thanks much.
-DB