title: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
body: <p>In an attempt to get mysql installed on my mac for a rails project I followed an online suggestion of installing homebrew and removing mac ports. This is where the problems began. The rails project won't build, I am getting this:</p>
  
  <blockquote>
    <blockquote>
      <p>[rake --prereqs] rake aborted!</p>
      
      <p>dlopen(/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle, 9): </p>
      
      <p>Library not loaded: /opt/local/lib/libiconv.2.dylib</p>
      
      <p>Referenced from: /Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle</p>
      
      <p>Reason: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0 </p>
      
      <p>/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
      /Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require'</p>
      
      <p>...</p>
    </blockquote>
  </blockquote>
  
  <p>I've tried the suggest of running </p>
  
  <blockquote>
    <p>brew install libiconv</p>
  </blockquote>
  
  <p>to which I receive the message:</p>
  
  <blockquote>
    <blockquote>
      <p>Error: No available formula for libiconv
      Apple distributes libiconv with OS X, you can find it in /usr/lib.
      Some build scripts fail to detect it correctly, please check existing
      formulae for solutions.</p>
    </blockquote>
  </blockquote>
  
  <p>I've also tried </p>
  
  <blockquote>
    <p>gem install nokogiri -- --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.1</p>
  </blockquote>
  
  <p>to which I receive:</p>
  
  <blockquote>
    <blockquote>
      <p>ERROR:  Error installing nokogiri:</p>
      
      <p>ERROR: Failed to build gem native extension.</p>
      
      <p>/Users/Parker/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.1
      Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK</p>
      
      <p>Running 'configure' for libxml2 2.8.0... OK</p>
      
      <p>Running 'compile' for libxml2 2.8.0... OK</p>
      
      <p>Running 'install' for libxml2 2.8.0... OK</p>
      
      <p>Activating libxml2 2.8.0 (from /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...</p>
      
      <p>Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26... OK</p>
      
      <p>Running 'configure' for libxslt 1.1.26... OK</p>
      
      <p>Running 'compile' for libxslt 1.1.26... OK</p>
      
      <p>Running 'install' for libxslt 1.1.26... OK</p>
      
      <p>Activating libxslt 1.1.26 (from /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.26)...</p>
      
      <p>checking for libxml/parser.h... no</p>
    </blockquote>
    
    <p>>
    -----
    libxml2 is missing.  please visit <a href="http://nokogiri.org/tutorials/installing_nokogiri.html" rel="noreferrer">http://nokogiri.org/tutorials/installing_nokogiri.html</a> for 
    help with installing dependencies.
    -----</p>
    
    <blockquote>
      <p>*** extconf.rb failed ***
      Could not create Makefile due to some reason, probably lack of necessary
      libraries and/or headers.  Check the mkmf.log file for more details.  You may
      need configuration options.</p>
      
      <p>Provided configuration options:
          --with-opt-dir
          --without-opt-dir
          --with-opt-include
          --without-opt-include=${opt-dir}/include
          --with-opt-lib
          --without-opt-lib=${opt-dir}/lib
          --with-make-prog
          --without-make-prog
          --srcdir=.
          --curdir
          --ruby=/Users/Parker/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
          --with-zlib-dir
          --without-zlib-dir
          --with-zlib-include
          --without-zlib-include=${zlib-dir}/include
          --with-zlib-lib
          --without-zlib-lib=${zlib-dir}/lib
          --with-iconv-dir
          --without-iconv-dir
          --with-iconv-include
          --without-iconv-include=${iconv-dir}/include
          --with-iconv-lib
          --without-iconv-lib=${iconv-dir}/lib
          --with-xml2-dir
          --with-xml2-include
          --without-xml2-include=${xml2-dir}/include
          --with-xml2-lib
          --without-xml2-lib=${xml2-dir}/lib
          --with-xslt-dir
          --with-xslt-include
          --without-xslt-include=${xslt-dir}/include
          --with-xslt-lib
          --without-xslt-lib=${xslt-dir}/lib
          --with-libxslt-config
          --without-libxslt-config
          --with-pkg-config
          --without-pkg-config
          --with-libxml-2.0-config
          --without-libxml-2.0-config
          --with-libiconv-config
          --without-libiconv-config</p>
      
      <p>Gem files will remain installed in /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0 for inspection.</p>
      
      <p>Results logged to /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out</p>
    </blockquote>
  </blockquote>
  
  <p>I have worked to resolve this issue for well over 8 hours. I have tried every link and every suggest google supplies me with. I am completely stumped. It seems to me I'm in over my head and have caused some environment issues. I realize more information is probably needed, but I don't know what to supply. Please let me know what other information would help diagnose the problem.</p>