Why won't bundler install the json 1.7.4 gem on OS X 10.8?
I am not sure, but I upgraded to OS X 10.8 2 days ago (from Lion, where my Rails configuration worked fine). And I had the same JSON 1.7.4 issue.
Eventually, I solved the problem by noticing that Xcode's command line tools were NOT installed (but they were on OS X 10.7!). I just reinstalled CLI tools in Xcode and that JSON 1.7.4 issue disappeared.
Also just in case it's helpful, check out this guide: https://thoughtbot.com/blog/the-hitchhikers-guide-to-riding-a-mountain-lion
Thanks to aabulkhairov for his solution.
Here's one for anyone having the same symptom but still running OS X Lion
I was able to updating Xcode to 4.4 from the App Store, then using XCode > Preferences > Downloads to install CLI tools; this resolved the problem. The new XCode is compatible with Lion, and my Rails app is running as expected.
I think I got into this state because the previous version of XCode 4.2.1, installed from the App Store, had displaced my even older version downloaded from developer.apple.com -- that's likely where I lost the CLI tools. Since that time, I apparently never needed to compile a gem with native extensions again.