ruby-on-railsrubywindowsdevkit

gem install json --platform=ruby failed windows 7 64 bit


I'm following the DevKit to get json gem to install. However it has not worked for me. This has been preventing me to do bundle install. Computer is Win 7 64 bit. Commands for ruby dk.rb init and ruby dk.rb install passed.

ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
Rails 4.2.6

Error

>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
The system cannot find the path specified.
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    current directory: C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3/ext/json/ext/
generator
C:/ruby/bin/ruby.exe -r ./siteconf20160413-5616-jod3h4.rb extconf.rb
creating Makefile

extconf failed, exit code 1

Gem files will remain installed in C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3 f
or inspection.
Results logged to C:/ruby/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/json-
1.8.3/gem_make.out

Solution

  • Check are you getting the proper ruby version in the file after doing ruby dk.rb init, if not specify the proper ruby version as in the program files, then try to run ruby dk.rb install, once this is done devkit is installed and you can install the required gem.