I've tried to install Nokogiri 1.6.1 under Ruby and RVM but is failing with the following error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/lmo0/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... ERROR, review 'tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.26/configure.log' to see what happened.
*** 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
--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/lmo0/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
/Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/mini_portile-0.5.2/lib/mini_portile.rb:265:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `chdir'
from /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `execute'
from /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/mini_portile-0.5.2/lib/mini_portile.rb:65:in `configure'
from /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/mini_portile-0.5.2/lib/mini_portile.rb:108:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:131:in `call'
from extconf.rb:131:in `block in <main>'
from extconf.rb:122:in `tap'
from extconf.rb:122:in `<main>'
Gem files will remain installed in /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.1 for inspection.
Results logged to /Users/lmo0/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.out
tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.26/configure.log
? – Disherisonlibxml2
andlibxslt
installed? – Windingchecking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /Users/lmo0/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/bin:/Users/lmo0/.rvm/gems/ruby-2.0.0-p247/bin:/Users/lmo0/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/lmo0/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/lmo0/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/s
– Orthochromaticgrep
via homebrew... That may help with your problem. – Disherisonhomebrew install grep
did actually add ggrep to /usr/local/bin and now need to just create a symlink – Orthochromaticgrep
is built into Mac OS. There's absolutely no reason to install an additional instance of it. Typewhich grep
at the command-line. If it doesn't show up, your PATH is messed up, or you somehow deleted it. – Laudatorygrep
that comes with osx mavericks and adding the GNU grep just solved my problem. There is an explanation on the Nokogiri github project that lead me to this solution. github.com/sparklemotion/nokogiri/issues/935 – Orthochromatic