0

我正在关注 DevKit 来安装 json gem。但是它对我没有用。这一直在阻止我做bundle install。电脑是Win 7 64位。命令ruby dk.rb initruby dk.rb install通过。

ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
Rails 4.2.6

错误

>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
The system cannot find the path specified.
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    current directory: C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3/ext/json/ext/
generator
C:/ruby/bin/ruby.exe -r ./siteconf20160413-5616-jod3h4.rb extconf.rb
creating Makefile

extconf failed, exit code 1

Gem files will remain installed in C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3 f
or inspection.
Results logged to C:/ruby/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/json-
1.8.3/gem_make.out
4

1 回答 1

2

检查您在执行ruby​​ dk.rb init后是否在文件中获得了正确的 ruby​​ 版本,如果没有在程序文件中指定正确的 ruby​​ 版本,则尝试运行ruby​​ dk.rb install,一旦完成安装 devkit 并您可以安装所需的 gem。

于 2016-04-13T11:25:10.367 回答