WATIR 安装 Server 2003 失败

发布于 2024-09-17 21:06:51 字数 355 浏览 8 评论 0原文

我必须重建我的盒子,目前无法安装 Watir。

gem 安装 watir
错误:安装 watir 时出错:
activesupport 需要 Ruby 版本 >= 1.8.7。

如果 Watir 能够使用 Ruby 1.8.7 那就太好了。我正在使用

红宝石-v
ruby 1.8.6(2008-08-11 补丁级别 287)[i386-mswin32]
宝石-v
1.3.7

我不确定这种情况是什么时候开始发生的,但网站上缺乏文档。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

剧终人散尽 2024-09-24 21:06:51

在 Windows XP(专业版,版本 2002,Service Pack 3,完全路径化)上,我安装了 ruby186-26.exe 来自 RubyForge,如 < a href="http://watir.com/installation/" rel="nofollow noreferrer">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

我已下载 rubygems-update-1.3.7.gem来自 RubyForge,将其复制到我打开命令提示符的文件夹(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 安装为 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
...

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
...
じее 2024-09-24 21:06:51

我刚才遇到了类似的问题,我想对此问题添加评论。我们的开发虚拟机当前运行的是 Windows 7,因此我需要以管理员身份运行命令提示符,以便 gem 安装正常工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文