保证ruby和gem没有问题的前提下
rubyinstaller-1.9.2-p180.exe 以管理员打开安装 安装时 两个单选框 都选中
C:\Documents and Settings\Administrator>ruby
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]ruby -v更新rubygem gem update --system
C:\Documents and Settings\Administrator>gem -v
1.5.2gem install/list/uninstall selenium-webdriver
2.gem install selenium-webdriver报错
(一)
C:\Documents and Settings\Administrator>gem install selenium-webdriver
ERROR: Could not find a valid gem 'selenium-webdriver' (>= 0) in any repository
ERROR: Possible alternatives: selenium-webdriver
C:\Documents and Settings\Administrator>gem sources --remove http://rubygems.org/
http://rubygems.org/ removed from sources
C:\Documents and Settings\Administrator>gem sources -a https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources
C:\Documents and Settings\Administrator>gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
目的:修改gem镜像
(二)
没有加代理
3、查看文档
gem server
localhost-0.0.0.0
转载于:https://blog.51cto.com/upcgg/1660326