Ruby watir环境搭建错误解决方法
Ruby watir环境搭建在实际操作中可能会遇到一些问题,往往这些小错误会使经验不太丰富的新手们甚为头疼。在这里我们就为大家详细介绍一下Ruby watir环境搭建时出现的错误解决办法。
Ruby watir环境搭建完成后用下面例子来测试:
require 'watir'
ie = Watir::IE.new
ie.goto('http://www.g.cn')
如果能够打开'http://www.g.cn'就说明安装成功
可惜我没有安装成功,提示以下Ruby watir环境搭建错误
d:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb:59:
uninitialized constant Windows::API::Error (NameError)
from
d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from
d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from
d:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/process.rb:3
from d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from
d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from d:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-process.rb:1
from d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from
d:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from d:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:45
from
web.rb:17
在谷歌搜索找到这个网址 http://www.zhuaijun.cn/archives/53 ,他的原帖是: