Ruby:无法在 Windows 上安装 Watir Gem

发布于 2024-08-15 22:44:22 字数 868 浏览 3 评论 0原文

Watir 网站 说我需要 Ruby 1.8.6,我正在运行它。 Windows 安装应该像 gem install watir 一样简单。但是当我运行它时,我得到:

C:\Users\Ryguy\Code>gem install watir
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
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:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5 f
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5/ext/gem_make.out

我的 Ruby 版本: ruby​​ 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
我的 RubyGems 版本: 1.3.5

Watir's site says I need Ruby 1.8.6, which I'm running. And windows installation should be as simple as gem install watir. But when I run that, I get this:

C:\Users\Ryguy\Code>gem install watir
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
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:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5 f
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5/ext/gem_make.out

My Ruby Version: ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
My RubyGems Version: 1.3.5

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

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

发布评论

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

评论(5

享受孤独 2024-08-22 22:44:22

我建议您安装此处记录的 RubyInstaller 开发工具

包安装它后,Watir 依赖项(win32-api)的编译过程将安装成功。

I would recommend you install the RubyInstaller Development Kit as documented here

Once you've installed it, the compile process of Watir dependencies (win32-api) will install successfully.

相对绾红妆 2024-08-22 22:44:22

结果我需要安装 Ruby 开发文件。 =/

Turns out I needed to install the Ruby Development files. =/

飞烟轻若梦 2024-08-22 22:44:22

执行下面的命令及其工作

gem install watir --platform=mswin32

Execute Below command and its works

gem install watir --platform=mswin32

遗弃M 2024-08-22 22:44:22

安装了 devkit 并在 Windows 7 上从 cmd 调用 bat 文件后修复了此问题。使用 Ruby 1.9.1

Installed devkit and after calling the bat file on Windows 7 from a cmd it fixed this issue. Using Ruby 1.9.1

绝影如岚 2024-08-22 22:44:22

在安装 DevKit 后,我​​还必须安装 nokogiri 才能在 Windows 上成功安装 Watir。使用:gem install nokogiri

I also had to install nokogiri to get Watir to install successfully on windows, after installing DevKit. Use: gem install nokogiri

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