0

我正在尝试安装 rails,但在我需要正确安装 devkit 之前。
所以我正在做正常的程序,但我不明白出了什么问题。我正在使用 ruby​​ 2 x64,并尝试使用 DevKit x32 和 x64。这是使用 devkit x64 的。这里有什么问题..?谢谢你。

c:\DevKit>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:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile

make
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so

make install
/usr/bin/install -c -m 0755 generator.so C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems
/json-1.8.0/lib/C/Ruby200-x64/lib/ruby/site_ruby/2.0.0/x64-msvcrt/json/ext
/usr/bin/install: cannot create regular file `C:/Ruby200-x64/lib/ruby/gems/2.0.0
/gems/json-1.8.0/lib/C/Ruby200-x64/lib/ruby/site_ruby/2.0.0/x64-msvcrt/json/ext'
: No such file or directory
make: *** [install-so] Error 1


Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-
1.8.0 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.0/ext/json/ex
t/generator/gem_make.out

注意:在我在 x32 和 x64 情况下安装“ruby dk.rb install -f”之前。

编辑:对于试图回复 ruby​​ dk.rb 等程序的人,我已经多次这样做了:

c:\DevKit>ruby dk.rb init
初始化完成!请查看并修改自动生成的 'config.yml' 文件,以确保它包含您希望通过 DevKit 增强的所有已安装 Ruby 的根目录。

c:\DevKit>ruby dk.rb review
根据运行 'ruby dk.rb init' 生成的 'config.yml' 文件中的设置以及您的任何自定义设置,DevKit 功能将在您运行时注入以下 Ruby '红宝石 dk.rb 安装'。

C:/Ruby200-x64

c:\DevKit>ruby dk.rb install -f
[WARN] 更新(有备份)'C:/Ruby200-x64' 的现有 gem 覆盖
[WARN] 更新(有备份)'C:/Ruby200- 的 DevKit 帮助程序库x64'

4

1 回答 1

0

我也有安装了java,jdk的windows

我试过了

 ruby 2.0.0p0 (2013-02-24) [i386-mingw32]

C:\Users\rajarshid>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed json-1.8.0
Parsing documentation for json-1.8.0
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.so, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.so, skipping
Installing ri documentation for json-1.8.0
Done installing documentation for json (2 sec).
1 gem installed

请检查开发套件是否安装正确

ruby dk.rb review

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

于 2013-08-30T13:05:33.110 回答