繁体   English   中英

使用Ruby2 x64安装gem

[英]gem installation with Ruby2 x64

我正在尝试安装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>红宝石dk.rb初始化
初始化完成! 请查看并修改自动生成的“ config.yml”文件,以确保它包含您要由DevKit增强的所有已安装红宝石的根目录。

c:\\ DevKit> ruby​​ dk.rb评估
根据运行“ ruby​​ dk.rb init”生成的“ config.yml”文件中的设置以及您的任何自定义,当您运行“ ruby​​ dk.rb install”时,DevKit功能将注入到以下Ruby中。

C:/ Ruby200-x64

c:\\ DevKit>红宝石dk.rb安装-f
[WARN]更新(带有备份)'C:/ Ruby200-x64'的现有gem覆盖
[WARN]为C:/ Ruby200-x64更新(带有备份)DevKit帮助程序库

我也有安装了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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM