在Windows XP(Professional,Version 2002,Service Pack 3,完全路徑)我已經安裝ruby186-26.exe從RubyForge,建議在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
自動RubyGems的更新沒有工作:
C:\>gem update --system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
我從RubyForge下載rubygems-update-1.3.7.gem,它複製到我(在這個例子中C:\
)有命令提示符打開該文件夾並安裝:
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
...
爲了確保我擁有最新的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/
現在的Watir不想安裝:
C:\>gem install watir
ERROR: Error installing watir:
activesupport requires Ruby version >= 1.8.7.
我已經安裝的ActiveSupport-2.3.8作爲suggested by Charley Baker,我是能夠安裝的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
...
從網站下載Rubygems而不是從Ruby方式下載。此外,這對watir有什麼幫助? – Woot4Moo 2010-09-06 12:21:03
對不起,我在調查過程中保存了答案,如果我的瀏覽器崩潰了(或其他),我不想丟失它。我已經用解決方案更新了答案。 – 2010-09-06 12:27:28
所有的真正修復:$ gem install activesupport --version =「2.3.8」 – rogerdpack 2010-09-07 17:09:34