我刚刚在我的 Windows 7 PC 上安装了 Ruby 1.9.3。现在我正在寻找一些自动化脚本来编写。但是为此我必须安装以下内容,但我该如何安装它们呢?
- Selenium
- Nokogiri
- capybara
我的 Ruby 版本安装在目录 - C:\Ruby193
中。要从命令提示符运行 Ruby 命令,是否需要向 PATH
变量添加任何内容?
错误
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\peter>cd..
C:\Users>cd..
C:\>cd C:\Ruby193
C:\Ruby193>ruby
'ruby' is not recognized as an internal or external command,
operable program or batch file.
C:\Ruby193>gem install nokogiri
'gem' is not recognized as an internal or external command,
operable program or batch file.
C:\Ruby193>
最佳答案
gem install nokogiri
您可以对其他 gem 执行相同的操作。
关于ruby - 如何为 Ruby 安装 Selenium 和 Nokogiri?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14245192/