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。此外,我不想把任何宝石放在供应商/缓存中,因为这会使回购规模大得多。有什么帮助吗?

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

通过删除该行

install: bundle install --local

并放置cache: bundler删除那些行是有效的!

  apt: true
  bundler: true
  directories:
  - vendor/cache

最新更新