无法在Windows7上安装json gem

时间:2012-09-29 19:08:04

标签: ruby ruby-on-rails-3 rubygems gem

我正在运行Windows7,我在安装json gem时遇到了很大困难。我得到的错误在任何地方都没有得到解决。我已经通过RailsInstaller安装了DevKit,当我运行gem install json时,我收到以下错误:

C:\Users\Gavin>gem install json
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

        C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile

make
Makefile:161: warning: overriding commands for target `install-so'
Makefile:160: warning: ignoring old commands for target `install-so'
Makefile:162: *** missing separator.  Stop.


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/bin;/gems/json-1.7.5 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/bin;/gems/json-1.7.5/ext/json/ext/generator/gem_make.out

任何人都有任何想法可能会发生在这里?

1 个答案:

答案 0 :(得分:0)

我想你的devkit文件夹在路径中?否则,请尝试使用“gem install json_pure”。请参阅此文章,解释原因http://ruby.about.com/od/tasks/a/The-Json-Gem.htm