2013-08-30 64 views
0

我試圖安裝rails,但是在我需要正確安裝devkit之前。
所以我正在做正常的程序,但我不明白是什麼錯。我使用的是Ruby 2 x64,並且我嘗試了DevKit x32和x64。這是與devkit x64。這裏有什麼可能是錯的..?謝謝。用Ruby2 x64創建gem安裝

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的情況下, 「紅寶石dk.rb安裝-f」。

編輯:對於誰是試圖對紅寶石dk.rb等程序回覆,我已經做了多次這樣的:

C:\的devkit>紅寶石dk.rb初始化
初始化完成!請檢查並修改自動生成的 'config.yml'文件,以確保它包含您想要由DevKit增強的所有已安裝Rubies的所有 的根目錄。

C:\的devkit>紅寶石dk.rb審查
基於在「config.yml」文件中的設置運行「紅寶石dk.rb初始化」和任何您的自定義生成 , 的devkit功能將在運行'ruby dk.rb install'時注入下列紅寶石 。

C:/ Ruby200-64

C:\的devkit>紅寶石dk.rb安裝-f
[WARN]更新(與備份)現有寶石倍率爲 'C:/ Ruby200-64'
[WARN]更新(與備份)的devkit輔助庫 'C:/ Ruby200-64'

+0

你以管理員身份運行? – Lefsler

+0

是的,在cmd上寫的是:管理員 – LowFieldTheory

回答

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

+0

你可能有x86版本,我明白了。無論如何,當我寫這篇文章的時候,我做了所有需要的東西,用不同的東西做了3或4次,沒有任何工作,而且我廣泛在互聯網上搜索可能是什麼原因。 – LowFieldTheory