1

我从http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p448.exe将1.9.3 ruby​​ 安装到 C:\Ruby193。

我将https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe下载到 C:\ruby_dev_kit 并从那里运行 ruby​​ dk.rb init 然后 ruby​​ dk .rb 安装

全部安装成功。

然后,当我运行 gem install json 时,我一直在安装 json (1.4.6) 系统找不到指定的路径。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.
6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.6/ext/json/ext/ge
nerator/gem_make.out
An error occurred while installing json (1.4.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.4.6'` succeeds before bundling.

我也试过 gem install json --platform=ruby 没有改变任何东西。似乎存在 c 编译器问题,但我正确定义了路径并且也关联了 DevKit。尝试卸载和安装,没有帮助。有什么想法吗?

4

0 回答 0