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
I think you are missing something that is required to build nokigiri.
I generally recommend using rvm to install ruby and rails, as rvm will
install all the requirements for you and will help you to manage
different versions of ruby and rails, but I don't know about using rvm
with rhel7. On ubuntu this would be as simple as
Since the problem seemed to be with nokogiri, I managed to get it to
work with gem install nokogiri -- --use-system-libraries
However since there is a RPM for it, I should try that too.