【发布时间】:2014-02-05 09:24:48
【问题描述】:
我有以下.travis.yml 文件:
language: ruby
rvm:
- "2.0.0"
# uncomment this line if your project needs to run something other than `rake`:
before_script:
- psql -c "create database dummy_test;" -U postgres
- psql -c "CREATE USER dummy WITH PASSWORD 'dummy';" -U postgres
script:
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec rake db:test:prepare
- bundle exec rspec spec
当我尝试在 Travis CI 中运行它时,我收到以下错误消息:
$ RAILS_ENV=test bundle exec rake db:migrate --trace
rake aborted!
Don't know how to build task 'db:migrate'
几个小时以来,我一直在尝试不同的方法。我做错了什么?
【问题讨论】:
-
为什么在调用 db:test:prepare 时要迁移测试数据库?
-
它基于我找到的代码here。老实说,我不知道为什么会失败,所以我试着模仿对别人有用的方法。
标签: ruby-on-rails ruby travis-ci