ruby watir安装

照官方网站上说的安装[http://watir.com/installation/#win],老是在运行

gem update --system
gem install watir

的时候出错,错误如下:

C:\ruby\bin>gem update –system
Updating RubyGems…
Attempting remote update of rubygems-update
Install required dependency builder? [Yn]  Y
ERROR:  While executing gem … (Gem::GemNotFoundException)
    Could not find builder (>= 0) in any repository

google了好久,一般都是说把C:\ruby\lib\ruby\gems\1.8下的source_cache
文件删除就可以了, 可我删除后还是会出现那种错误,只好重新下载、卸载、
安装一遍,还是没有解决。
最后去http://rubyforge.org/frs/?group_id=126下载了1.3.5的gem安装包,
解压后,点出里面的setup.rb进行安装,进入命令行:

C:\ruby\bin>gem -v
1.3.5

发现安装好了gem,再运行

C:\ruby\bin>gem update –system
Updating RubyGems
Nothing to update

C:\ruby\bin>gem install watir
Successfully installed win32-api-1.4.5-x86-mswin32-60
Successfully installed windows-api-0.4.0
Successfully installed windows-pr-1.0.8
Successfully installed win32-process-0.6.2
Successfully installed xml-simple-1.0.12
Successfully installed rake-0.8.7
Successfully installed json_pure-1.2.0
Successfully installed rubyforge-2.0.3

.

.

.

终于安装成功啦

 
Share Post:

About Author

admin

Recommended Posts

2 Comments

  • As a Newbie, I am permanently browsing online for articles that can aid me. Thank you

Comments are closed for this article!