I saw a lot of questions of this kind but I have a little different situation, so i'm doing bundle install and got this:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150109-25233-1jiriou.rb extconf.rb --with-iconv-dir=/usr/local/Cellar/libiconv/1.14/
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
checking for iconv using --with-iconv-* flags... no
checking for iconv... no
-----
libiconv is missing. Please locate mkmf.log to investigate how it is failing.
-----
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/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 /var/folders/sk/x8m9btmj1g58c906v0z3k2br0000gq/T/bundler20150109-25233-o53u4y/nokogiri-1.6.5/gems/nokogiri-1.6.5 for inspection.
Results logged to /var/folders/sk/x8m9btmj1g58c906v0z3k2br0000gq/T/bundler20150109-25233-o53u4y/nokogiri-1.6.5/extensions/universal-darwin-14/2.0.0/nokogiri-1.6.5/gem_make.out
An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.5'` succeeds before bundling.
I have libiconv installed, I tried in this way gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14/ gem installs ok but than i try to bundle I got the same error again the same situation is when I try to do gem install nokogiri -v '1.6.5' the installation is ok, I can see the gem in the list of gems but seems like bundler is not seeing it, I tried to include it in my gem file with this specific version but still have this error
This worked for me: http://www.nokogiri.org/tutorials/installing_nokogiri.html#using_nonstandard_libxml2___libxslt_installations
gem install nokogiri -- \
--use-system-libraries \
--with-xml2-config=/usr/bin/xml2-config \
--with-xslt-config=/usr/bin/xslt-config
And then bundle update
You can use bundle config to set that path:
bundle config build.nokogiri "--with-iconv-dir=/usr/local/Cellar/libiconv/1.14/"
bundle install
This works for me bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
Run this command to set the config before bundle install
I got this solution from https://github.com/sparklemotion/nokogiri/issues/1099
This worked for me, thanks to Gergo & cbertelegni:
bundle config build.nokogiri "-- \
--use-system-libraries \
--with-xml2-config=/usr/bin/xml2-config \
--with-xslt-config=/usr/bin/xslt-config"
bundle install
Related
I try to clone this repo and run bundle install. The bundle process failed and throw this error:
...
Installing nokogiri 1.6.2.1 with native extensions
Building nokogiri using packaged libraries.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20151130-43880-pntnc6.rb 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/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/$(RUBY_BASE_NAME)
--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/zulhilmizainudin/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /Users/zulhilmizainudin/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.2.1/gem_make.out
An error occurred while installing nokogiri (1.6.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.
Then I try to run this:
gem install nokogiri -v '1.6.2.1'
And now I get this error:
Building native extensions. This could take a while...
Building nokogiri using packaged libraries.
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20151130-43942-1axq4sj.rb 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/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/$(RUBY_BASE_NAME)
--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/zulhilmizainudin/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /Users/zulhilmizainudin/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.2.1/gem_make.out
I tried to follow this answer but I still get the same error above.
I also try to uninstall and install my brew again (based on this answer) and it's still same.
Also, I try this solution but still get the error.
What should I do now to make sure this nokogiri gem installed successfully?
Note: I'm using OSX 10.11.1 El Capitan.
Run these commands:
gem uninstall nokogiri
xcode-select --install
gem install nokogiri
source: http://www.nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x
sometimes mac updates can break xcode CLI so reinstalling can fix the issue:
https://github.com/sparklemotion/nokogiri/issues/1445
What worked for me (on macOS Sierra) was a combination of Sam's answer and the following:
gem install nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 --use-system-libraries
I had a similar issue with 1.6.7.2 when bundle installing on codeship with ruby 2.3.
What worked for me was adding:
bundle config build.nokogiri --use-system-libraries
before
bundle install
If you're using bundle:
brew install libxml2
# If using Bundle
bundle config build.nokogiri --use-system-libraries \
--with-xml2-include=$(brew --prefix libxml2)/include/libxml2
bundle install
from http://www.nokogiri.org/tutorials/installing_nokogiri.html
Try this
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
And then install Nokogiri
sudo gem install nokogiri
I did everything in the other answers, but had to do one more thing:
Open Xcode
Click "Agree"
Wait a bit, close Xcode
Rejoice
Seems like this is due to nokogiri 1.6.2.1 specific problem.
I add this inside my Gemfile:
gem 'nokogiri', '~> 1.6', '>= 1.6.7'
And run bundle update nokogiri and then bundle. Everything now working fine.
It may also be an issue with the anaconda version of some of the libs.
$ conda deactivate
$ gem uninstall nokogiri
$ gem install nokogiri
$ conda activate base
worked for me.
I had the similar issue. The reason was outdated xcode.
If you run brew doctor you might see it. Just open AppStore, got to updates tab and update your xcode.
If nothing above works,
Try deleting Gemfile.lock, and do reinstalling of gems.
Spencer's answer worked for me, but I also needed to use the -n parameter to overcome the permission issue documented here.
So in the end, the command that worked for me was:
gem install -n /usr/local/bin nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 --use-system-libraries
Deleting nokogiri in rbenv gem folder and reinstalling solved it for me.
This helped me fix this
I reinstalled Xcode and directed xcode-select to its path
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
ref:
https://stackoverflow.com/a/17980786/3861525
I had the same issue while updating to xcode 10. I resolved it with the following steps :
xcode-select --install
bundle install --deployment
gem install nokogiri
Github Answer
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
bundle install
I'm installing nokogiri 1.6.6.2 on Arch Linux,as metasploit installation can't proceed without it.
I got the following output:
[ blackarch Downloads ]# gem install ./nokogiri-1.6.6.2.gem
Building native extensions. This could take a while...
ERROR: Error installing ./nokogiri-1.6.6.2.gem:
ERROR: Failed to build gem native extension.
/usr/bin/ruby -r ./siteconf20151103-1360-1u3d2zo.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
- 0001-Revert-Missing-initialization-for-the-catalog-module.patch
- 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.2... OK
Running patch with /root/.gem/ruby/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch...
Running 'patch' for libxml2 2.9.2... ERROR, review '/root/.gem/ruby/2.2.0/gems/nokogiri-1.6.6.2/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.2/patch.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
--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=/usr/bin/$(RUBY_BASE_NAME)
--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
/root/.gem/ruby/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:279:in `block in execute': Failed to complete patch task (RuntimeError)
from /root/.gem/ruby/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `chdir'
from /root/.gem/ruby/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `execute'
from extconf.rb:311:in `block in patch'
from extconf.rb:308:in `each'
from extconf.rb:308:in `patch'
from /root/.gem/ruby/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:108:in `cook'
from extconf.rb:278:in `block in process_recipe'
from extconf.rb:177:in `tap'
from extconf.rb:177:in `process_recipe'
from extconf.rb:475:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /root/.gem/ruby/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /root/.gem/ruby/2.2.0/extensions/x86_64-linux/2.2.0/nokogiri-1.6.6.2/gem_make.out
I've tried every possible solution I found, either locally installation or gem install nokogiri doesn't work...
You can try :
bundle config build.nokogiri --use-system-libraries
bundle install
Or you can reseach sth on
nokogiri doc
Try this way:
gem install nokogiri -v 1.6.6.2 -- --use-system-libraries
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
gem install nokogiri
did it for me
If you are using macOS Mojave, Xcode 10 on macOS Mojave moves the system headers out of /usr/include and so Nokogiri will fail to build.
Here is a workaround from nokogiri official installing guide
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
You should update your gemfile with the nokogiri gem
gem 'nokogiri', '~> 1.6', '>= 1.6.8'
after updating your Gemfile with the line of code above run:
bundle install
I'm trying to build my first application in Ruby on Rails, but when I run bundle install I get this message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 -r ./siteconf20150921-23095-eac5m6.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using
packaged libraries. checking for gzdopen() in -lz... no zlib is
missing; necessary for building libxml2
*** 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=/usr/bin/ruby2.1
--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
/tmp/bundler20150921-23095-1bpxdrp/nokogiri-1.6.6.2/gems/nokogiri-1.6.6.2
for inspection. Results logged to
/tmp/bundler20150921-23095-1bpxdrp/nokogiri-1.6.6.2/extensions/x86_64-linux/2.1.0/nokogiri-1.6.6.2/gem_make.out
An error occurred while installing nokogiri (1.6.6.2), and Bundler
cannot continue. Make sure that `gem install nokogiri -v '1.6.6.2'`
succeeds before bundling.
I tried to install Nokogiri using:
gem install nokogiri -v 1.6.6.2
but got this message:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.1.0 directory.
I also tried to run:
sudo gem install nokogiri -v 1.6.6.2
but got this message:
Building native extensions. This could take a while... ERROR: Error
installing nokogiri: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 -r ./siteconf20150921-24140-1odizm6.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using
packaged libraries. checking for gzdopen() in -lz... no zlib is
missing; necessary for building libxml2
*** 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=/usr/bin/ruby2.1
--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
/var/lib/gems/2.1.0/gems/nokogiri-1.6.6.2 for inspection. Results
logged to
/var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.6.2/gem_make.out
I'm new to Ubuntu and Ruby on Rails. How can I solve these problems?
It looks like you're missing prerequisites.
Nokogiri's "Troubleshooting Ubuntu/Debian Installation" documentation says:
Here’s what you should do if you should find yourself in this situation:
1 sudo apt-get install ruby-dev zlib1g-dev
Please report it as a bug if this doesn’t work for you (see Getting Help for details).
Because you're using Ubuntu and doing a normal install, you'll need sudo to do any gem installs.
I'd strongly recommend using rbenv or RVM to manage your Ruby installation(s) as they'll make your life a lot easier. If you use those, you won't need to use sudo again, except for any system-wide prerequisite libraries.
I'm trying to install Rails 4.2.0 on my computer, but I am having issues installing Nokogiri. I followed the steps in the first answer for "bundle install stopped at Nokogiri", but when I run brew install nokogiri, I get the following:
Activating libxslt 1.1.28 (from /Users/dseibert/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.0.0/libxslt/1.1.28)...
checking for main() in -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
-----
libxml2 is missing. Please locate mkmf.log to investigate how it is failing.
-----
*** 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/dseibert/.rvm/rubies/ruby-2.2.0/bin/$(RUBY_BASE_NAME)
--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
--with-xml2lib
--without-xml2lib
--with-libxml2lib
--without-libxml2lib
extconf failed, exit code 1
Gem files will remain installed in /Users/dseibert/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /Users/dseibert/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/nokogiri-1.6.6.2/gem_make.out
I cant find the mkmf file to locate the details of my libxml2 file, and I don't see either the libxml2 file or the Nokogiri folder within my Ruby source folder.
And when I run brew install libxml2, I get Warning: libxml2-2.9.2 already installed.
Following the comment, I got the response: Successfully installed nokogiri-1.6.6.2. But when I ran sudo gem install rails, I got back the above error again.
Try this
gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/
This works on OSX 10.11 El Capitan
Try this:
bundle config build.nokogiri --use-system-libraries
bundle install
This works on rails 4.2.0, OS X 10.11.2 El Capitan and Xcode 7.2.1 installed
You will get while running bundler:
Installing nokogiri 1.6.7.2 with native extensions
This question already has answers here:
Failure to install nokogiri libiconv is missing on Yosemite Mac OS X 10.10
(10 answers)
Closed 8 years ago.
I am trying to install Ruby on Rails via RVM on Yosemite. Everything seems to have worked, though, when I attempt to run 'bundle install' I am presented with an error relating to Nokogiri:
pauls-air:~ paulmcguane$ gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
Building native extensions with: '--with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib'
This could take a while...
Building nokogiri using packaged libraries.
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
The error message is:
/Users/paulmcguane/.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
--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/paulmcguane/.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
I just did a full installation of Rails and Ruby and everything you need. I followed these steps.
https://gorails.com/setup/osx/10.10-yosemite
and use the following to install nokogiri
xcode-select --install
gem install nokogiri
bundle config build.nokogiri --use-system-libraries
bundle install
I got this to work using macports instead of homebrew. My configuration:
Install the latest Xcode Beta (Beta 3 at time of writing).
xcode-select --switch /Applications/Xcode-Beta3
macports built/installed from source, per installation instructions here
sudo port install libxml2 libxslt
gem install nokogiri -- --with-iconv-include=/opt/local/include/
A little convoluted, but everything worked fine after that.