Nokogiri: Could not find nokogiri-1.6.6.2 in any of the sources

Created on 20 Oct 2015  路  2Comments  路  Source: sparklemotion/nokogiri

After upgrading from Yosemite to El Capitan, the Rails server is not starting, as it is giving the following error:

Could not find nokogiri-1.6.6.2 in any of the sources
Run bundle install to install missing gems.

After running bundle install it is giving the following error:

-bash: bundle: command not found

I am searching for this issue without any success. So, I have also tried out the following commands:

brew update
brew upgrade
brew install libxml2

sudo gem install nokogiri gives the following error:

Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151020-885->leo13i.rb extconf.rb
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.
Ignoring byebug-6.0.2 because its extensions are not built. Try: gem pristine byebug --version 6.0.2
Ignoring byebug-6.0.1 because its extensions are not built. Try: gem pristine byebug --version 6.0.1
Ignoring byebug-5.0.0 because its extensions are not built. Try: gem pristine byebug --version 5.0.0
Ignoring debase-0.1.4 because its extensions are not built. Try: gem pristine debase --version 0.1.4

Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine >debug_inspector --version 0.0.2

The file "/usr/include/iconv.h" is missing in your build environment,
which means you haven't installed Xcode Command Line Tools properly.

To install Command Line Tools, try running xcode-select --install on
terminal and follow the instructions. If it fails, open Xcode.app,
select from the menu "Xcode" - "Open Developer Tool" - "More Developer
Tools" to open the developer site, download the installer for your OS

version and run it.

* 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 /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/nokogiri->1.6.6.2/gem_make.out

Most helpful comment

It was Bundler problem. Now resolved successfully. Reference: https://github.com/bundler/bundler/issues/4065#issuecomment-149660170

All 2 comments

Under ls /Library/Ruby/Gems/2.0.0/gems
screen shot 2015-10-20 at 3 42 14 pm

It already has nokogiri-1.6.6.2

It was Bundler problem. Now resolved successfully. Reference: https://github.com/bundler/bundler/issues/4065#issuecomment-149660170

Was this page helpful?
0 / 5 - 0 ratings