Error while installing Rails using gem install rails

I've got this error, while trying to do

gem install rails

Bulk updating Gem source index for: http://gems.rubyforge.org
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 -y
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:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Program Files/ruby/bin/ruby
        --with-fcgi-dir
        --without-fcgi-dir
        --with-fcgi-include
        --without-fcgi-include=${fcgi-dir}/include
        --with-fcgi-lib
        --without-fcgi-lib=${fcgi-dir}/lib

Gem files will remain installed in C:/Program Files/ruby/lib/ruby/gems/
1.8/gems/
fcgi-0.8.7 for inspection.
Results logged to C:/Program Files/ruby/lib/ruby/gems/1.8/gems/
fcgi-0.8.7/ext/fc
gi/gem_make.out

I've tried with Ruby1.8.6.25 and Ruby1.8.6.26, with the same
error...??

Can someone help me...??

Thanks in advance!!

Christian
chrismada@gmail.com

http://wiki.rubyonrails.org/getting-started/installation/windows

What's that?? Where can I find it...??? How Can I install it???

What's that?? Where can I find it...??? How Can I install it???

A red herring. On many linux distros ruby is split into several
packages, this of course doesn't apply if you are on windows. The
error you are getting is gem failing to install the fcgi gem (probably
because you don't have an appropriate compiler) but I'm not sure why
it's trying in the first place - fcgi is pretty much dead as a method
of deploying rails these days and I don't think it was ever a
dependency of rails.

Fred

I was getting the same error. Install the fcgi header files with this
package:
sudo apt-get install libfcgi-dev