I still feel like working with rails in Linux feel easier and faster. What’s with all the homebrew thing in Mac, feel like you have to go through a lot of troubles just to complete something simple. But working with rails in Windows is another story altogether. Initiatives like Railsinstaller and Devkit help a lot to get Windows to be less of a pain, but still…
So I have install railsinstaller, and Devkit come installed with it. And I have things running pretty normal, till lately I try to create a new rails apps, doing a bundle install lead to error saying
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/json-1.7.6 for inspection. Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7. 6/ext/json/ext/generator/gem_make.out An error occured while installing json (1.7.6), and Bundler cannot continue. Make sure that gem install json -v '1.7.6' succeeds before bundling.
I tried to reinstall railsinstaller, and manually install Devkit. No working. Then tried to uninstall railsinstaller, and have ruby installer manually, then Devkit, make sure Devkit path is under ruby root, still the problem persist. Finally I found the solution in stackoverflow, from a link inÂ treehouse’s blog . The thing is Devkit doesn’t work with Autorun interfaces, so if you have previously have this setup, in my case it was the I setup for syntax highlighting in command prompt, then you will have to remove it.
Just type this into command prompt
REG QUERY "HKCU\Software\Microsoft\Command Processor" REG QUERY "HKLM\Software\Microsoft\Command Processor"
Should get something like below
HKEY_CURRENT_USER\Software\Microsoft\Command Processor CompletionChar REG_DWORD 0x9 DefaultColor REG_DWORD 0x0 EnableExtensions REG_DWORD 0x1 PathCompletionChar REG_DWORD 0x9
These columns actually stand for Key, Type and Value. If there is a Key named AutoRun, then this could be the root cause of the problem. In my case, I think the Autorun key was set when I setup ansicon.
Run this to remove it,
REG DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun
Close command prompt, and bundle install again in a new command prompt session, things should work.