ruby-on-rails – Windows上的Rails – 安装问题

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Windows上的Rails – 安装问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在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指南作为安装参考.

原文链接:https://www.f2er.com/ruby/273960.html

猜你在找的Ruby相关文章