我尝试将Travis VI添加到我的公共github存储库中。 要使用taglib-ruby用户,应在系统上安装 libtag1-dev 包。所以我写了我的.travis.yml文件,如下所示
language: ruby
rvm:
- 2.0.0
env:
- DB=mysql
before_install:
- sudo apt-get update
- sudo apt-get install -y libtag1-dev
script:
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec rake db:test:prepare
- bundle exec rspec spec/
before_script:
- mysql -e 'create database my_app_test'
但travis总是告诉以下
失败Installing rack-cache 1.2
Installing rack-test 0.6.2
Installing rack-ssl 1.3.4
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/travis/.rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for main() in -ltag... no
You must have taglib installed in order to use taglib-ruby.
Debian/Ubuntu: sudo apt-get install libtag1-dev
Fedora/RHEL: sudo yum install taglib-devel
Brew: brew install taglib
MacPorts: sudo port install taglib
答案 0 :(得分:4)
我使用以下
解决了language: ruby
rvm:
- 2.0.0
env:
- DB=postgresql
before_install:
- sudo apt-get update
- sudo apt-get install -y libtag1-dev
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- "bundle exec rake db:migrate"