Skip to content

xiaozi0lei/xinTest

Repository files navigation

xinTest

web automation test app

Installation

  1. 安装rvm, rvm是ruby version manager.到rvm官网安装 http://rvm.io/
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
  1. 通过rvm安装ruby
rvm install 2.0.0
  1. 安装git
  2. 将github上的xinTest仓库克隆到本地
git clone git@gitlab.iduoku.cn:QA/apiTest.git
  1. 安装postgreSQL和mysql
sudo yum install postgresql-server
sudo yum install postgresql-devel
sudo yum install mysql-devel
  1. 初始化数据库 sudo service postgresql initdb
  2. 配置本地用户信任
# ubuntu
sudo vi /etc/postgresql/9.3/main/pg_hba.conf
# centos
sudo vi /var/lib/pgsql/data/pg_hba.conf

update the local all postgres peer to local all postgres trust 8. 启动postgreSQL sudo service postgresql start

  1. bundle项目所需要的gem包
cd xinTest
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l
gem install bundler
bundle install
  1. 创建数据库 rake db:create
  2. 数据库迁移 rake db:migrate
  3. 启动程序 rails s