gem install json -v 1.7.3 gives 'Please update your PATH to include build tools'

Joe picture Joe · May 22, 2012 · Viewed 58.5k times · Source

When I run:

rails new blog

I get:

Installing json (1.7.3)
Gem::InstallError: The 'json' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.

When I run:

gem install json -v 1.7.3

I get:

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

I'm using Windows 8. I do have c:\ruby193\bin in my path. What do I do to remedy these errors?

Answer

Julien Pellet picture Julien Pellet · May 22, 2012

Make sure you install the devkit (ticking the checkboxes that will update the path) : You might need to reinstall ruby too.

Install the DevKit

Download Development Kit from here http://rubyinstaller.org/downloads/

DevKit url at this time For use with Ruby 1.8.7 and 1.9.3: DevKit-tdm-32-4.5.2

For use with Ruby 2.0 and above (32bits version only): DevKit-mingw64-32-4.7.2

For use with Ruby 2.0 and above (x64 - 64bits only) DevKit-mingw64-64-4.7.2

Follow instructions here.

Or short instructions :

Unzip the zip

open command-line and go to unzipped folder

ruby dk.rb init

ruby dk.rb install

gem install rdiscount --platform=ruby