The 'Json' Native Gem Requires Installed Build Tools

The 'json' native gem requires installed build tools

I believe those installers make changes to the path. Did you try closing and re-opening the CMD window after running them and before the last attempt to install the gem that wants devkit present?

Also, be sure you are using the right devkit installer for your version of Ruby. The documentation at devkit wiki page has a requirements note saying:

For RubyInstaller versions 1.8.7, 1.9.2, and 1.9.3 use the DevKit

Error installing json gem: The 'json' native gem requires installed build tools

There are detailed steps for installing DevKit here:

And to test that your installation is working correctly, you are supposed to try this:

gem install json --platform=ruby

So, you should already have json installed. Instead of reinstalling ruby, I would try reinstalling DevKit...and follow the directions EXACTLY.

The 'puma' native gem requires installed build tools

I solved the problem by following these instruction:

  • download devkit from here.

  • Install the file in DevKit folder

  • open cmd and navigate to the folder

  • Copy the path of the ruby folder you installed in C drive and paste it in the DevKit\config.yml. Change ‘/’ in the path to ‘\’.

It should look like this:

# Example:
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
- C:\Ruby22
  • Run ruby dk.rb install
  • Back to your rails folder, run bundle install and you should not have any errors

Rails Installation error :The 'atomic' native gem requires installed build tools

I have also gone through the same problem. After doing a lot of research, I found a solution that works.

Run this command:

pik list

It should show you

187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
193: ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
200: ruby 2.0.0p247 (2013-06-27) [i386-mingw32]

If it's not pointing to Ruby version 200 then run the following:

pik use 200

Now run the following to enhance DevKit to your installed Ruby:

ruby dk.rb install

Finally, run the following:

gem install rails

This will install latest Rails version 4 for Ruby 2.0.

Gem::InstallError: The 'json' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit

I didn't initialize and bind the ruby installations in my DevKit to my PATH:

Downloaded it, ran it to extract it somewhere (permanent). Then cd to it, run ruby dk.rb init and ruby dk.rb install. The bundle install command worked after following these steps.

Gem::InstallError: The 'nio4r' native gem requires installed build tools

Somehow or another you're interacting with two different installations of Ruby and the on later in the PATH has Bundler installed.

Once you install the Devkit the must install Devkit message is completely removed from the installation.

Try running where.exe bundle to see where the Bundler executables are at, then run where.exe gem to see where your RubyGem executables are and compare.

If you have two different gem executable locations then you probably could just use gem install bundler to quickly fix the problem.

Related Topics

Leave a reply