I used the below link to solve the problem. But got few other problems.
gem install json -v 1.7.3 gives 'Please update your PATH to include build tools'
`enter code here`C:\>ruby dk.rb init
[INFO] found RubyInstaller v2.2.4 at C:/Ruby22
Initialization complete! Please review and modify the auto-generated 'config.yml' file to ensure it contains the root directories to all of the installed Rubies you want enhanced by the DevKit.
I don't know what changes I am supposed to make and how.
C:\>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby22'
[INFO] Installing 'C:/Ruby22/lib/ruby/site_ruby/devkit.rb'
C:\>gem install rdiscoun
t --platform=ruby
Fetching: rdiscount-2.1.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
C:/Ruby22/bin/ruby.exe -r ./siteconf20160313-1220-1i9eix7.rb extconf.rb
checking for random()... *** 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)
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generat
e an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:1020:in `block in have_func'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpo
ne'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:1019:in `have_func'
from extconf.rb:5:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/rdiscount-
2.1.8 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/rdi
scount-2.1.8/gem_make.out
Can you please help me with the problem. I've been trying solve this problem for a month. Thank you.