I ran into a error when installing the first gem on a CentOS development server I was creating. The error states that the extconf.rb file could not the header files. Below I show the output of the error along with what was done to resolve the error.
While creating a development environment for a Ruby project earlier I ran into an error installing some of the gems required by the project. I realized that I had installed an older version of RubyGems which was causing problems with some of the gem dependents that needed to be installed. Below I list one of the examples of the errors I was running into and how I resolved the issue.
Earlier when attempting to install the request-log-analyzer gem on a CentOS Linux server I ran into some issues. I noticed that on one server I was able to install the request-log-analyzer gem without issue but on another server running the same version of CentOS and Ruby as the first server the attempt to install request-log-analyzer returned an error. The error was that the gem required a newer version of another gem.
./lib/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — rdoc/rdoc (LoadError)
When attempting to install rubygems on a fresh Amazon Web Services EC2 instance I received the below error. Ruby had been installed by default on the instance and I was installing rubygems manually. The below error was received when attempting to run the setup.rb script with ruby.