I\'m on Windows and am getting the following error when running gem install json —platform=ruby
:
The system canno
So this isn't the best answer in the world, but I seem to have stumbled on a solution. If I set the verbose flag, everything works fine:
gem install json --platform=ruby --verbose
There's a log here: http://gist.github.com/dannysmith/8055495
That makes no sense - it'd be great if someone could explain why this seems to have fixed the error. Perhaps this is a bug in devkit?
How I fixed it:
I have gem json installed with versions 1.8.1 but I was not able to solve this issue for json 1.6.1 using
gem install json --platform=ruby --verbose
So, I tried from here https://github.com/oneclick/rubyinstaller/issues/184
gem update --system 2.0.3
And after that
gem install json -v 1.6.1 --platform=ruby --verbose
It solve issue specific to json 1.6.1 for Win 7(64 bit) machine
Install the 32 bit version on Windows...
ver
windows 6.1.76011
64 bit gave error message about makefile and headers. Tried all other suggestions including those on rubyinstaller about COMSPEC and registry, adding gcc to path, and others. Some gems would install but git_fame and json would not as needed to compile.
Edit: It looks like git_fame uses mimer_plus. mimer_plus assumes gnu tools (unix tools). Looks like you need to install mingw first. That was not clearly indicated on the rubyinstaller page.
I had the same problem. I used powershell to check my path
ps> $s = $env:path
ps> $s.split("{;}")
sure enough my the ruby mingw was not in the path. I had the ruby\bin in the path but the mingw\bin was under a different folder. I went into my environment path and added it and my install worked.
Make sure that the ruby version you installed (32 or 64 bit) matches the DevKit version. They both have to be 32 or 64, which was the issue I was having. May not be the exact issue here, but thought I'd throw that out there. Here's a post worth checking out:
Rails on windows - install issue