windows 平台安装 cucumber

1. install rubyinstaller

ruby -v

测试是否安装成功

2. config proxy

vi ~/.gemrc
gem: --http-proxy http://[ip]:[port]

3. validation ssl version

$ ruby -ropenssl -e 'p OpenSSL::OPENSSL_VERSION'
"OpenSSL 1.0.1l 15 Jan 2015"

4. gem install cucumber,rspec,selenium etc...

  gem install cucumber -v 1.3.13
  gem install rspec
  gem install selenium-webdriver
  gem install watir-webdriver
  gem install watir

4.1 遇到的坑

C:\>gem install cucumber
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: diff-lcs-1.2.4.gem (100%)
Successfully installed diff-lcs-1.2.4
Fetching: multi_json-1.7.6.gem (100%)
Successfully installed multi_json-1.7.6
Fetching: gherkin-2.12.0.gem (100%)
ERROR:  Error installing cucumber:
        The 'gherkin' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

4.2 Download DevKit

uncompress DevKit to c:Ruby\DevKit

ruby dk.rb init
ruby install dk.rb

4.3 gem install cucumber -v 1.3.13

if still got error msg similar like :

Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/specs.4.8.gz)

To solve this issue you should download ca from gemsearch,copy it into C:\Ruby22-x64\lib\ruby\2.2.0\rubygems\ssl_certs\

5. 参考文档

转载于:https://my.oschina.net/dlpinghailinfeng/blog/779562

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值