0

Mac: OS X Mavericks 10.9.2 Ruby: 2.1.2

I am trying to install nokogiri for rails and run into an error when it is building the packaged libraries. The libiconv is missing and I go to the installation page given in the error message, but run into a warning message that I'm not sure what to do with.

Here is what I get when I run bundle:

 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/user/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 
Building nokogiri using packaged libraries.
-----
libiconv is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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.

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/user/.rvm/rubies/ruby-2.1.2/bin/ruby
    --help
    --clean
    --use-system-libraries
    --enable-static
    --disable-static
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --enable-cross-build
    --disable-cross-build

extconf failed, exit code 1

Gem files will remain installed in /Users/user/.rvm/gems/ruby-2.1.2@campus-taps-master/gems/nokogiri-1.6.3.1 for inspection.
Results logged to /Users/user/.rvm/gems/ruby-2.1.2@campus-taps-master/extensions/x86_64-darwin-13/2.1.0-static/nokogiri-1.6.3.1/gem_make.out
An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling.

I then ran brew install libxml2 libxslt per instructions and was fine, but when I run brew link libxml2 libxslt. I get these two warning messages:

Warning: libxml2 is keg-only and must be linked with --force
Note that doing so can interfere with building software.
Warning: libxslt is keg-only and must be linked with --force
Note that doing so can interfere with building software.

I'm not sure what to do and don't want to mess up my system.

cphill
  • 5,596
  • 16
  • 89
  • 182

0 Answers0