Ruby:拥有正确的DevKit和Ruby版本 - 无法构建gem原生扩展

时间:2013-11-05 07:22:27

标签: ruby json gem install devkit

我从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 install

这一切都安装成功。

然后,当我运行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也相关联。 尝试卸载并安装,没有帮助。有什么想法吗?

0 个答案:

没有答案