安装json
C:\tmp\20150528>gem install json
gem install package.gem -l 需要安装 wingw 编译器,注意本机ruby 是32 bit 还是 64bit.
ruby -v
选择安装合适devkit
http://rubyinstaller.org/downloads
cd <DEVKIT_INSTALL_DIR>
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
如果选择错了.那么编译会有问题:
size of array 'ruby_check_sizeof_voidp' is negative
gem install json --platform=ruby --verbose
gem update --system 2.0.3
gem install json -v 1.6.1 --platform=ruby --verbose
So, I tried from here https://github.com/oneclick/rubyinstaller/issues/184
引用:
https://github.com/oneclick/rubyinstaller/issues/175
http://rubyer.me/blog/134/