During Rails install - ERROR: Failed to build gem native extension

Installed Ruby 1.8.6-26 Final Release…then tried to install Rails
and got error show below…
Any ideas ?

PS. Had issues with 1.8.6-27 with sql lite and simple app work so
went to this version which gave
me another error… Having no luck :<

C:\Ruby>gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org
Install required dependency rake? [Yn] Y
Install required dependency activesupport? [Yn] Y
Install required dependency activerecord? [Yn] Y
Install required dependency actionpack? [Yn] Y
Install required dependency rack? [Yn] Y
Install required dependency test-spec? [Yn] Y
Install required dependency camping? [Yn] Y
Install required dependency markaby? [Yn] Y
Install required dependency builder? [Yn] YV
Install required dependency metaid? [Yn] Y
Install required dependency fcgi? [Yn] Y
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install rails
checking for fcgiapp.h… no
checking for fastcgi/fcgiapp.h… no
*** 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:

Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/
fcgi-0.8.7 for
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/fcgi-0.8.7/ext/fcgi/


Couple questions:

  • what version of Rubygems do you have? The ‘bulk update’ message
    hints that it might not be the most recent, needed by 2.3.2.

  • something is seriously wrong with your rubygems install; the Rails
    gem shouldn’t be pulling down things like Camping and Markaby.

–Matt J.

You’re not crazy. It’s broken.
cured by:
gem update --system

These instructions work great:

Thanks to Matt J. for the diagnosis.