Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby:无法在Windows上安装Watir Gem_Ruby_Watir - Fatal编程技术网

Ruby:无法在Windows上安装Watir Gem

Ruby:无法在Windows上安装Watir Gem,ruby,watir,Ruby,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.

说我需要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

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

我建议您按照文档中的说明安装RubyInstaller开发工具包


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

执行下面的命令及其工作原理


gem install watir--platform=mswin32

已安装devkit,在通过cmd调用Windows 7上的bat文件后,它修复了此问题。在安装DevKit之后,使用Ruby 1.9.1,我还必须安装nokogiri,才能让Watir在windows上成功安装。用法:gem安装nokogiri

只是一个想法……我们的公司从Windows开始,很快发现使用Cygwin(linux“仿真器”)会更容易,然后我们转向虚拟化Ubuntu,因为尝试在Windows上运行Ruby有点痛苦。祝你好运!是的,这就是我所做的(谢谢,虽然我不想怀疑你的说法,但你确定吗?我已经成功地用DevKit编译了大多数Windows gems,没有任何问题,包括win32utils。。。哪个bat文件?非常无用的回答。