Install Middleman on Windows 7 - Nokogiri Error During Installation

I am trying to install Middleman on Windows 7. I ran into Nokogiri problems and manually installed it by following instructions on Nokogiri’s web site.

http://www.nokogiri.org/tutorials/installing_nokogiri.html#windows

After installing nokogiri, I ran gem install middleman to install Middleman and received the following error.

===========
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
ERROR: Error installing middleman:
ERROR: Failed to build gem native extension.

current directory: C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7/ext/nokogiri

C:/Ruby22/bin/ruby.exe -r ./siteconf20151209-6896-1sxrqso.rb extconf.rb
checking if the C compiler accepts … *** 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
–without-make-prog
–srcdir=.
–curdir
–ruby=C:/Ruby22/bin/$(RUBY_BASE_NAME)
–help
–clean
C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:571:in block in try_compile’
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:522:in with_werror' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:571:in try_compile’
from extconf.rb:80:in nokogiri_try_compile' from extconf.rb:87:in block in add_cflags’
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:619:in with_cflags' from extconf.rb:86:in add_cflags’
from extconf.rb:336:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/nokogiri-1.6.7/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/nokogiri-1.6.7/gem_make.out

Is there any way to let the installer skip Nokogiri since I have already installed it separately?

I realised my nokogiri was 64-bit version when it should be 32-bit version. Simply compared to ruby -v and realised my mistake. I should have installed the 32-bit version.

All good now.