运行 Ruby 脚本时遇到以下错误消息:
undefined local variable or method `firewatir' for main:Object (NameError)
以下版本:
Ruby187\bin>ruby -v
ruby 1.8.7 (2012-10-12 patchlevel 371) [i386-mingw32]
Ruby187\bin>gem -v
1.8.24
Ruby187\bin>gem install firewatir
Successfully installed firewatir-1.9.4
- 火狐 3.5 版
- 安装了 JSSh 1.0
脚本
require 'firewatir'
require 'win32ole'