Failed WATIR installation Server 2003

走远了吗. 提交于 2019-12-11 12:36:21

问题


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.


回答1:


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 -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\>gem env
RubyGems 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 --system
Updating 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.gem
Successfully installed rubygems-update, version 1.3.7
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README

C:\>update_rubygems
RubyGems 1.3.7 installed
...

To make sure I have the latest RubyGems:

C:\>gem env
RubyGems 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 watir
ERROR:  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.8
1 gem installed
Installing ri documentation for activesupport-2.3.8...
Installing RDoc documentation for activesupport-2.3.8...

C:\>gem install watir
Successfully installed firewatir-1.6.5
Successfully installed nokogiri-1.4.3.1-x86-mswin32
Successfully installed watir-1.6.5
3 gems installed
...



回答2:


I had a similar issue just now and thought I would add a comment to this issue. Our dev vm's are currently running windows 7, therefore I needed to run my command prompt as administrator for the gem installation to work correctly.



来源:https://stackoverflow.com/questions/3643179/failed-watir-installation-server-2003

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!