资源介绍
http://*.com/questions/3643179/failed-watir-installation-server-2003
Failed WATIR installation Server 2003
Hi all, I had to rebuild my box and I currently am unable to install Watir.
gem install watir
ERROR: Error installing watir:
activesupport requires Ruby version >= 1.8.7.
Which would be fine if Watir was able to use Ruby 1.8.7 . I am using
ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
gem -v
1.3.7
I am not sure when this started to occur, but the documentation on the site is lacking.
answer:
3 down vote accepted
On Windows XP (Professional, Version 2002, Service Pack 3, fully pathched) I have installed ruby186-26.exe from RubyForge, as suggested at watir.com/installation.
C:\>ruby -vruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]C:\>gem envRubyGems Environment: - VERSION: 0.9.4 (0.9.4) - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 - GEM PATH: - c:/ruby/lib/ruby/gems/1.8 - REMOTE SOURCES: - http://gems.rubyforge.org
Automatic RubyGems update did not work:
C:\>gem update --systemUpdating RubyGems...ERROR: While executing gem ... (Gem::RemoteSourceException) HTTP Response 302
I have downloaded rubygems-update-1.3.7.gem from RubyForge, copied it to the folder where I have command prompt open (C:\ in this example) and installed:
C:\>gem install rubygems-update-1.3.7.gemSuccessfully installed rubygems-update, version 1.3.7Installing ri documentation for rubygems-update-1.3.7...Installing RDoc documentation for rubygems-update-1.3.7...Could not find main page READMECould not find main page READMECould not find main page READMECould not find main page READMEC:\>update_rubygemsRubyGems 1.3.7 installed...
To make sure I have the latest RubyGems:
C:\>gem envRubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe - EXECUTABLE DIRECTORY: c:/ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - c:/ruby/lib/ruby/gems/1.8 - C:/Documents and Settings/Administrator/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/
Now Watir did not want to install:
C:\>gem install watirERROR: Error installing watir: activesupport requires Ruby version >= 1.8.7.
I have installed activesupport-2.3.8 as suggested by Charley Baker, and I was able to install Watir:
C:\>gem install activesupport --version="2.3.8"Successfully installed activesupport-2.3.81 gem installedInstalling ri documentation for activesupport-2.3.8...Installing RDoc documentation for activesupport-2.3.8...C:\>gem install watirSuccessfully installed firewatir-1.6.5Successfully installed nokogiri-1.4.3.1-x86-mswin32Successfully installed watir-1.6.53 gems installed...
//////////
suggested by Charley Baker:
http://groups.google.com/group/watir-general/browse_thread/thread/cd2ce989784fa854
Hi every1, I am new to Watir and Firewatir. I tried the Watir in 5 mins tutorial on Watir OpenQA Wiki. It ran successfully once, but now when I say b=Watir::Browser.new, it produces a NoMethodError for a method 'demodulize'. I tried some stuff around and when I said require 'firewatir/firefox' , the browser popped up and was good to go. Similarly I had to import the text_field and link elements in order for the tutorial to work. I think there has to be an easy way around. I tried using require 'firewatir' but even that produced the NoMethodError. Also on my home PC, I need to do require 'rubygems' but on my work PC require 'rubygems' returns false and I can directly do require 'watir'. What could be the reason for that? Here is some information about the versions of softwares I'm using OS: Windows XP Browser: Firefox 3.6.8 Ruby: 1.8.7 Gems: 1.3.7 Watir: 1.6.5 FireWatir: 1.6.5 I would really appreciate all the help. Thanks in advance ///////The activesupport gem has changed, you mostly likely have 3.0.0. I'll look into it, but in the meantime, you can roll back to an earlier version: gem uninstall activesupport gem install activesupport --version '=2.3.8' gem list activesupport #make sure 3.0.0 isn't installed. Looks like we might need a release sooner than later. Charley Baker Lead Developer, Watir, http://watir.com - 隐藏被引用文字 -- 显示引用的文字 -On Thu, Sep 2, 2010 at 12:20 PM, chaitanya wrote: > Hi every1, > I am new to Watir and Firewatir. I tried the Watir in 5 mins > tutorial on Watir OpenQA Wiki. It ran successfully once, but now when > I say b=Watir::Browser.new, it produces a NoMethodError for a method > 'demodulize'. I tried some stuff around and when I said require > 'firewatir/firefox' , the browser popped up and was good to go. > Similarly I had to import the text_field and link elements in order > for the tutorial to work. > I think there has to be an easy way around. I tried using require > 'firewatir' but even that produced the NoMethodError. > Also on my home PC, I need to do require 'rubygems' but on my work PC > require 'rubygems' returns false and I can directly do require > 'watir'. What could be the reason for that? > Here is some information about the versions of softwares I'm using > OS: Windows XP > Browser: Firefox 3.6.8 > Ruby: 1.8.7 > Gems: 1.3.7 > Watir: 1.6.5 > FireWatir: 1.6.5 > I would really appreciate all the help. Thanks in advance > -- > Before posting, please read http://watir.com/support. In short: search before you ask, be nice. > You received this message because you are subscribed to http://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: watir-general+unsubscribe@googlegroups.com
////////////
下载地址:
ruby186-26.exe
http://rubyforge.org/frs/download.php/29263/ruby186-26.exe
rubygems-update-1.3.7.gemhttp://rubyforge.org/frs/download.php/70695/rubygems-update-1.3.7.gem activesupport-2.3.8.gemhttp://rubygems.org/downloads/activesupport-2.3.8.gem watir-1.6.5.gemhttp://rubyforge.org/frs/download.php/66928/watir-1.6.5.gem