构建 Gem 时出错

发布于 2024-08-27 17:06:13 字数 1402 浏览 3 评论 0原文

我尝试安装以下 gem:

http://github.com/maxjustus/sinatra-authentication

在 Windows 7 上通过一键安装程序运行 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

我在网上到处查看,尝试安装早期版本,并尝试手动安装但没有成功(它给了我一个堆栈太深错误)。

我怀疑 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.

您对如何解决这个问题有任何想法吗?谢谢!

I tried to install the following gem:

http://github.com/maxjustus/sinatra-authentication

on Windows 7 running Ruby 1.9 from the One-Click Installer.

I got the following error:

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

I looked everywehere online, tried to install earlier versions, and attempted a manual install without success (it gave me a stack too deep error).

I suspect there are problems with the yajl-ruby gem (http://github.com/brianmario/yajl-ruby), a dependency? (I think)

The logs in gem_make.out show:

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.

Do you have any idea as to how to solve this? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

喜爱皱眉﹌ 2024-09-03 17:06:14

看起来 gem 安装依赖于正在安装的 make 程序,而您没有该程序。您可以使用GNU Make for Windows

It looks like the gem installation depends on the make program being installed, which you do not have. You can use GNU Make for Windows.

浅听莫相离 2024-09-03 17:06:14

我在尝试在Windows上安装rails时也遇到了这个问题。在显示器前抱怨了 45 分钟后,我偶然发现了这个 Rails 安装程序,它在我的机器上成功安装了 ruby​​ 和 Rails!
http://railsinstaller.org/

I also ran into this problem when trying to install rails on windows. After 45 minutes grumbling in front of the monitor, I stumbled across this rails installer, which got ruby and rails successfully installed on my machine!
http://railsinstaller.org/

等待圉鍢 2024-09-03 17:06:13

要编译C扩展,需要安装RubyInstaller附带的devkit。
您可以在此处找到下载链接:http://rubyinstaller.org/downloads

To compile C extensions, you need to install the devkit that comes with RubyInstaller.
You will find a link to download it here: http://rubyinstaller.org/downloads

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文