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 に注入されます。 「ruby dk.rb インストール」。

C:/Ruby200-x64

c:\DevKit>ruby dk.rb install -f
[WARN] Updating (with backup) existing gem override for 'C:/Ruby200-x64'
[WARN] Updating (with backup) DevKit helper library for 'C:/Ruby200- x64'

4

1 に答える 1

0

Java、jdkがインストールされたウィンドウもあります

私は試した

 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 に答える