Travis-CI配置文件定制

时间:2016-01-14 09:55:40

标签: ruby-on-rails travis-ci

在我目前的travis-ci文件中,我有这样的配置。

注意:我想自定义此文件,因为vendor/cache中没有任何内容。由于在travis-ci构建中出现错误

0.44s$ bundle install --local
Some gems seem to be missing from your vendor/cache directory.
Could not find rake-10.5.0 in any of the sources
The command "bundle install --local" failed and exited with 7 during .
Your build has been stopped.

我只想删除此错误,但我对Travis-ci完全不熟悉。我也不想把任何宝石放在供应商/缓存中,因为它会使repo的大小更大。对此有何帮助?

language: ruby
install: bundle install --local
cache:
  apt: true
  bundler: true
  directories:
  - vendor/cache

rvm:
- 2.2.2

addons:
  postgresql: 9.3
  code_climate:
      repo_token: 

before_script:
  - psql -U postgres -c "create extension postgis"
  - ./scripts/travis
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 1

script:
- RAILS_ENV=test bundle exec rspec --pattern 'c*/*_spec.rb,h*/*_spec.rb'

env:
  matrix:
  - DATABASE_URL="postgres://localhost/evercam_tst"
  global:
  - secure: 
  - secure: 

branches:
  only: master

1 个答案:

答案 0 :(得分:1)

删除该行

install: bundle install --local

并放cache: bundler  并删除它的工作线!

  apt: true
  bundler: true
  directories:
  - vendor/cache
相关问题