Hi, I have a rhel7 system and am trying to install the rails gem, I was
wondering how to troubleshoot this since I don’t see any useful error
message. I’m guessing i’m just missing something, how to see what it
might be?
gem install rails
Building native extensions. This could take a while…
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking if the C compiler accepts … yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.0.0
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
- 0003-Stop-parsing-on-entities-boundaries-errors.patch
- 0004-Cleanup-conditional-section-error-handling.patch
- 0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
- 0006-Another-variation-of-overflow-in-Conditional-section.patch
- 0007-Fix-an-error-in-previous-Conditional-section-patch.patch
- 0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
- 0009-Updated-config.guess.patch
- 0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch
- 0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch
- 0012-Avoid-processing-entities-after-encoding-conversion-.patch
- 0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch
- 0014-CVE-2015-5312-Another-entity-expansion-issue.patch
- 0015-Add-xmlHaltParser-to-stop-the-parser.patch
- 0016-Detect-incoherency-on-GROW.patch
- 0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch
- 0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch
- 0019-Do-not-print-error-context-when-there-is-none.patch
- 0020-xmlStopParser-reset-errNo.patch
- 0021-Reuse-xmlHaltParser-where-it-makes-sense.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-redhat-linux-gnu/ports/libxml2/2.9.2… *** 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}/lib64
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/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
/usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:344:in
spawn': no implicit conversion of nil into String (TypeError) from /usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:344:in
block in execute’
from
/usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in
chdir' from /usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in
execute’
from
/usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:331:in
extract_file' from /usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:57:in
block in extract’
from
/usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:56:in
each' from /usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:56:in
extract’
from
/usr/local/share/gems/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:147:in
cook' from extconf.rb:289:in
block (2 levels) in process_recipe’
from extconf.rb:182:in block in chdir_for_build' from extconf.rb:181:in
chdir’
from extconf.rb:181:in chdir_for_build' from extconf.rb:288:in
block in process_recipe’
from extconf.rb:187:in tap' from extconf.rb:187:in
process_recipe’
from extconf.rb:478:in `’
Gem files will remain installed in
/usr/local/share/gems/gems/nokogiri-1.6.7.2 for inspection.
Results logged to
/usr/local/share/gems/gems/nokogiri-1.6.7.2/ext/nokogiri/gem_make.out