Master ruby with us

json gem installation problem in Ruby on Rails 3.0 on Windows and usage of DevKit

Posted by firstruby on November 13, 2011

While installaing json gem in Ruby on Rails 3.0 or 3.1, I was getting following error,

firstruby@FIRSTRUBY /demo
$ gem install json -v=1.4.6 –platform=ruby –no-ri –no-rdoc
Fetching: json-1.4.6.gem (100%)
ERROR: Error installing json:
The ‘json’ native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from ‘’ and follow the instructions
at ‘’

firstruby@FIRSTRUBY /demo

To fix this problem, need to install Development Kit (DevKit – Its a toolkit that makes it easy to build and use native C/C++ extensions for Ruby on Windows) as follows,

1) Download DevKit file from (DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe)
2) Extract DevKit to path C:\Ruby192\DevKit
3) Goto DevKit installation directory,

cd C:\Ruby192\DevKit

4) Run following command,

ruby dk.rb init

It will generate the config.yml file. This config file should include installed Ruby path, like “C:\Ruby192”
5) Run following command,

ruby dk.rb review

It is useful to review the list of Rubies to be enhanced to use the DevKit and verify the changes you made to it are correct.
6) Run following command,

ruby dk.rb install

It is useful to enhance your installed Rubies and makes it easy to build and use native C/C++ extensions such as json.

Reference :


25 Responses to “json gem installation problem in Ruby on Rails 3.0 on Windows and usage of DevKit”

  1. Aatish said

    Thank you so much.

    It worked but ruby command only works in ruby/bin folder.

    What should i do to use ruby in devKit folder…..should i use setpath=”path/ruby/bin”

    Or any other way..??

  2. Delfo said

    it worked fine for me, i’m a newbie and this was a very precious info ๐Ÿ™‚

  3. louiseibbs said

    Awesome thank you.. this prevented me tearing my hair out ๐Ÿ™‚ worked just fine and dandy!!!

  4. Shail said

    very very helpful…… thanks for the information….

  5. kaushak said

    Thanks, it worked

  6. sanjay c salunkhe said

    thank you very much sir… it was very helpful… after searching thousands of website,i found your website very useful.

  7. booboo the bear said

    really helpful, thanks

  8. Dpn said

    helped a lot…,

  9. swati said

    Very helpful , Thanks

  10. nopol said

    Big thank you for saving me a boatload of time

  11. priyanka said

    Thank you very much, i have been struggling with this problem from 2hrs

  12. Nicolas said

    Thank you very much, very useful solution

  13. Only diamonds I own are firmly attatched to saw blades, grinding discs, and my favourite sharpening stones.
    In that fashion they’re exceptionally valuable.

  14. Wow! This blog looks just like my old one! It’s on a totally
    different subject but it has pretty much the same page layout and design.
    Excellent choice of colors!

  15. outlet chanel Handbag
    Heya i’m for the first time here. I found this
    board and I find It truly helpful & it helped
    me out much. I’m hoping to offer something back and help others like you aided me.

  16. After watching the shows, children definitely are
    in search of those sources through which they can get to know that how magician has done all these tricks.

    The resort locations range from mountain slopes to coastal plains providing
    variety of RCI accommodation. Presented in stark contrast is his wife Lois- the attractive, logically thinking wife representing the fantasy of all American males.

  17. Great post. I was checking constantly this weblog and I’m inspired!

    Extremely useful information particularly the ultimate
    section ๐Ÿ™‚ I care for such information a lot. I used to be looking for this certain info for a very long time.
    Thank you and best of luck.

  18. I took a large nervous pause, then I meekly manufactured some lame bluff about how I was
    heading dominate her – as my voice raised a very few octaves increased.
    There are however a quantity of non professional medical and purely natural tactics to previous
    longer in bed for adult males. Fishermen will bring cooking gear to
    the beach and then catch and boil them on the spot for eating.

  19. You can find some screens from the multiplayer of the open-world action-adventure
    video game in the slideshow to the left of this article and the video tutorials fully explaining the cheats on the Trade in Detectives website.
    To do so, the receiver must cooperate with another user who owns the desired car.
    Men and ladies are VERY different regarding cheating.

  20. This is my first time pay a quick visit at here and i am really
    happy to read everthing at single place.

  21. Very good information. Lucky me I discovered your blog
    by chance (stumbleupon). I have saved as a favorite for later!

  22. What’s up i am kavin, its my first time to commenting anywhere, when i
    read this piece of writing i thought i could
    also make comment due to this good paragraph.

  23. Greetings! Very useful advice within this post!
    It’s the little changes which will make the greatest changes.

    Thanks for sharing!

  24. Here is a list if features and capabilities the Vo โ€“ IP industrynis looking for:. Hippie earrings are distinctive,nhandmade from natural c Click

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: