简体   繁体   中英

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

I install the Ruby: Successful

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

gem -v
=> 1.8.24

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

When I try to install any gem: Failed.

Worked good for me from home, but it's not working from my work place. I tried pinging the rubygems.org site, but it's not pinging. I downloaded the gems straight from the site and put it in the folder: (watir-webdriver) C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>

Installed gems like this: C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>gem install watir-webdriver

Getting this error: C:\\Ruby193\\lib\\ruby\\gems\\1.9.1\\gems>gem install watir-webdriver ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

If you are installing on linux (which I had a similar issue on Ubuntu), you will need to follow these instructions

First, get the right zlib driver

sudo apt-get install libzlib-ruby

Second, check your sources and possibly add to them:

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

BTW, I had a long process of updating my various libraries on Ubuntu to enable reasonable IRB interaction (history, tab-complete, color, etc.) on Ubuntu. It took some work but was worth it to be able to use RVM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM