簡體   English   中英

無法安裝任何Gems(watir-webdriver,selenium-webdriver)

[英]Unable to install any Gems (watir-webdriver, selenium-webdriver)

我安裝了Ruby:成功

ruby -v
=> ruby 1.9.3p392 (2013-02-22) [i386-mingw32]

gem -v
=> 1.8.24

gem source
=> *** CURRENT SOURCES ***
=> http://rubygems.org/

當我嘗試安裝任何gem時:失敗。

在家工作對我有好處,但不在我的工作場所工作。 我嘗試對rubygems.org網站執行ping操作,但未進行ping操作。 我直接從網站上下載了gems,並將其放在文件夾中:(watir-webdriver) C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>

像這樣安裝寶石: C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>gem install watir-webdriver

出現此錯誤: C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>gem install watir-webdriver ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

您是代理人嗎? 在這種情況下,請參見以下頁面以尋求幫助:

如果您要在Linux上安裝(我在Ubuntu上有類似問題),則需要遵循以下說明

首先,獲取正確的zlib驅動程序

sudo apt-get install libzlib-ruby

其次,檢查您的來源並可能添加到其中:

gem sources
gem sources -a http://gems.rubyforge.org/
gem sources -a http://rubygems.org

順便說一句,我花了很長時間在Ubuntu上更新各種庫,以在Ubuntu上實現合理的IRB交互(歷史記錄,制表符完成,顏色等)。 它花了一些工作,但是值得使用RVM。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM