我尝试安装以下gem:
http://github.com/maxjustus/sinatra-authentication
在Windows 7上运行来自One-Click安装程序的Ruby 1.9的。
我收到以下错误:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Joel>gem install sinatra-authentication
Building native extensions. This could take a while...
ERROR: Error installing sinatra-authentication:
ERROR: Failed to build gem native extension.
C:/Ruby19/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/yajl-ruby-
0.7.5 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/yajl-ruby-0.7.5/ext/gem_mak
e.out
我在网上看了很多,试图安装早期版本,尝试手动安装但没有成功(它给了我stack too deep
错误。)
我怀疑yajl-ruby
gem(http://github.com/brianmario/yajl-ruby)存在问题,这是一个依赖关系? (我认为)
gem_make.out
中的日志显示:
C:/Ruby19/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
您对如何解决这个问题有任何想法吗?谢谢!
答案 0 :(得分:3)
要编译C扩展,需要安装RubyInstaller附带的devkit。 您可以在此处找到一个下载链接:http://rubyinstaller.org/downloads
答案 1 :(得分:0)
看起来gem安装依赖于您正在安装的make
程序,而您没有。您可以使用GNU Make for Windows。
答案 2 :(得分:0)
尝试在Windows上安装rails时,我也遇到了这个问题。在显示器前面抱怨45分钟后,我偶然发现了这个导轨安装程序,导致ruby和rails成功安装在我的机器上! http://railsinstaller.org/