Closed mcmire closed 9 years ago
Okay, I figured it out. Ruby 2.1.4 was already installed, but where apple-gcc42
had been brew link
ed. I unlinked it prior to installing Nokogiri. After keeping it unlinked, then completely removing Ruby 2.1.4 and re-installing it using Clang instead, I didn't have any problems re-installing Nokogiri.
Is there anything we can learn from this, that we should add to the installation tutorial?
Quick facts:
bundle config build.nokogiri --with-iconv-dir=/usr/local/opt/libiconv
) because otherwise Nokogiri can't find it (separate issue though)I am getting this error when attempting to install Nokogiri:
Here is the mkmf.log output:
So the error in this case appears to be misleading.
As you can see, when it checks whether libiconv is installed, the first check (without the
-liconv
flag) fails, but then the second one succeeds.When
have_func
is then called to determine whether libxml is fully available, that check fails, as libiconv is being referenced inside of libxml. However doing so does not work, as the-liconv
flag is not being passed toclang
in this case.Ideally, I believe
have_iconv?
should add libiconv to the list of libraries somehow so that subsequent commands properly include it.