Q:

require nokogiri issue with ruby

I've installed nokogiri using the "gem install nokogiri" command in git bash and shows me the gem has installed successfully. But when I try to run rails s it gives me the require error for nokogiri. I am not sure what's the reason and how to solve it.
I am using windows 10
I am using Ruby 2.2.3
Installing nokogiri

Error that I get
 

A:

I'm afraid nokogiri won't work for the combination of Ruby 2.2 and mingw. According to https://github.com/sparklemotion/nokogiri/issues/1256, it is currently only supported for Ruby 1.9, 2.0 and 2.1.
There is a workaround with manual install of libraries, as described in RubyInstaller 2.2.1 and Rails - Rake cannot load Nokogiri, but it seems to be a bit tricky. So if Ruby 2.2 is not that critical for you, you may want to downgrade to Ruby 2.1. 
And as a general recommendation -- development on Ruby/Rails using Windows it not really optimal, consider switching to Linux

