When attempting to install the Ruby JSON gem on Windows you are most likely going to get an error similar to the below. The trick is to instead install json_pure gem using the syntax listed below the error.

Error:

C:>gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.

C:/ruby/bin/ruby.exe extconf.rb install json
creating Makefile

nmake
'nmake' is not recognized as an internal or external command, operable program or batch file.

Gem files will remain installed in C:/ruby/lib/ruby/gems/1.8/gems/json-1.1.3 for inspection.
Results logged to C:/ruby/lib/ruby/gems/1.8/gems/json-1.1.3/ext/json/ext/parser/gem_make.out

Install json_pure gem:

gem install json_pure

That should do it.

Tags: , , , , , , ,
6 Responses to “Install Ruby JSON Gem on Windows”
  1. alex says:

    You can also get older Windows JSON gem versions here >> http://rubyforge.org/frs/?group_id=953

    [Reply]

  2. Goelz says:

    Very interesting post – Might be old new, but it was new to me. Thanks.

    [Reply]

  3. Murrietta says:

    This is most likely the very best article that ever cross my reference. I do not see why anyone ought to disagree. It might be too simple #for them# to comprehend…anyway good work i am coming back right here for More Nice Stuff!!

    [Reply]

    alex Reply:

    Hello Murrietta,

    Wow… Thanks so much for the kind feedback! It is really nice to receive a comment like this as we literally write articles every day for free in an attempt to help others through their technology related problems. Anyway thanks again for taking the time to post feedback.

    Thanks.
    alex

    [Reply]

  4. Thiyagarajan Veluchamy says:

    Hi,

    Thanks a lot. Good Work!

    [Reply]

    alex Reply:

    Hello Thiyagarajan Veluchamy,

    No problem. Thanks for taking the time to leave feedback.

    Thanks.
    alex

    [Reply]

  5.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*