保证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.2
(一)
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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。