我试图在Windows的盒子上安装ruby,并且有一个问题.当我开始收到错误时,我已经到了这一点,而对于web开发来说,我完全是PHP以外的新功能.帮助赞赏!
编辑我按照这里的指示wamp:
http://www.alexbernard.fr/fichiers/blog/Installer-Ruby-On-Rails-sur-un-Wamp-Server.pdf
./gem install rails --include-dependencies
输出:
INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. C:/wamp/ruby/bin/ruby.exe extconf.rb creating Makefile make generating generator-x64-mingw32.def compiling generator.c make: x86_64-w64-mingw32-gcc: Command not found make: *** [generator.o] Error 127 Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/2.0.0/gems/json-1.8.0 for inspection. Results logged to C:/wamp/ruby/lib/ruby/gems/2.0.0/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
解决方法
从上面显示的输出,我假设:
>安装Ruby 2.0.0 x64(64位)
>从RubyInstaller页面安装一些DevKit
现在,如here所述,对于64位Ruby,您需要64位DevKit.
make:x86_64-w64-mingw32-gcc:找不到命令
很明显你没有安装正确的DevKit.
请删除已安装的DevKit,下载正确的(如上述链接和RubyInstaller downloads page中所示)并重新安装.
您将需要使用ruby dk.rb install –force(请注意–force选项)来覆盖以前的DevKit安装.
对于弃用错误,不再需要–include-dependencies.我建议您使用现代的Ruby / Rails指南作为安装参考.