Created
November 21, 2012 17:22
-
-
Save kcampos/4126187 to your computer and use it in GitHub Desktop.
Travis CI rake (db:schema:load|db:migrate|db:test:prepare) operations failing w/"table does not exist" error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
adapter: mysql2 | |
database: my_app_test | |
username: root | |
encoding: utf8 | |
cucumber: | |
adapter: mysql2 | |
database: my_app_test | |
username: root | |
encoding: utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 1.8.7 | |
env: | |
- RAILS_ENV=test | |
before_script: | |
- "mysql -e 'create database my_app_test;'" | |
- "cp ./.travis.database.yml ./config/database.yml" | |
script: | |
- bundle exec rake db:schema:load | |
- bundle exec rake db:test:prepare | |
- bundle exec rake spec | |
after_failure: | |
- "mysql -e 'show databases;'" | |
- "cat ./config/database.yml" | |
- "echo $RAILS_ENV" | |
- "bundle exec rake --version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
source "http://gems.rubyforge.org" | |
source "http://gems.github.com" | |
gem "acts_as_reportable", "1.1.1" | |
gem "attr_encrypted", "1.1.2" | |
gem "cucumber", "0.4.3" | |
gem "builder", "2.1.2" | |
gem "email_spec", "0.6.2" | |
gem "fakeweb", "1.3.0" | |
gem "ftpfxp", "0.0.4" | |
gem "geokit", "1.5.0" | |
gem "googlecharts", "1.3.6", :require => "gchart" | |
gem "haml", "2.2.17" | |
gem "hoe", "2.6.1" | |
gem "httparty", "0.4.3" | |
gem "mechanize", "0.6.7" | |
gem "mocha", "0.9.9" | |
gem "mongrel", "1.0.1" | |
gem "newrelic_rpm", "2.9.8" | |
gem "nokogiri", "1.4.2" | |
gem "polyglot", "0.2.9" | |
gem "prawn", "0.2.2" | |
gem "rake", "0.8.7" | |
gem "RedCloth", "3.0.3", :require => "redcloth" | |
gem "rghost", "0.8.7.6" | |
gem "rghost_barcode", "0.9" | |
gem "rspec", "1.2.9", :require => "spec" | |
gem "rspec-rails", "1.2.9", :require => false | |
gem "rubyist-aasm", "2.1.1", :require => "aasm" | |
gem "ruby-hl7", "1.0.3" | |
gem "scruffy", "0.2.6" | |
gem "termios", "0.9.4" | |
gem "thoughtbot-factory_girl", "1.2.2", :require => "factory_girl" | |
gem "thoughtbot-shoulda", "2.11.1", :require => "shoulda" | |
gem "webrat", "0.5.3" | |
# Travis specific | |
gem "activerecord-mysql2-adapter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rvm use 1.8.7 | |
Using /home/travis/.rvm/gems/ruby-1.8.7-p371 | |
$ ruby --version | |
ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-linux] | |
$ gem --version | |
1.8.24 | |
$ export BUNDLE_GEMFILE=/home/travis/builds/.../.../Gemfile | |
$ bundle install | |
Fetching gem metadata from http://rubygems.org/....... | |
Fetching gem metadata from http://gems.rubyforge.org/....... | |
Fetching gem metadata from http://gems.github.com/. | |
Fetching full source index from http://gems.github.com/ | |
Fetching source index from http://rubygems.org/ | |
Fetching source index from http://gems.rubyforge.org/ | |
Installing rake (0.8.7) | |
Installing RedCloth (3.0.3) | |
Installing mysql2 (0.3.11) with native extensions | |
Installing activerecord-mysql2-adapter (0.0.3) | |
Installing fastercsv (1.5.5) | |
Installing color (1.4.1) | |
Installing transaction-simple (1.4.0.2) | |
Installing pdf-writer (1.1.8) | |
Installing ruport (1.6.3) | |
Installing acts_as_reportable (1.1.1) | |
Installing allison (2.0.3) | |
Installing eigenclass (1.1.1) | |
Installing encryptor (1.1.3) | |
Installing mocha (0.9.9) | |
Installing attr_encrypted (1.1.2) | |
Installing builder (2.1.2) | |
Installing cgi_multipart_eof_fix (2.5.0) | |
Installing crack (0.3.1) | |
Installing diff-lcs (1.1.2) | |
Installing polyglot (0.2.9) | |
Installing term-ansicolor (1.0.4) | |
Installing treetop (1.4.2) | |
Installing cucumber (0.4.3) | |
Installing daemons (1.1.9) | |
Installing gemcutter (0.7.1) | |
Installing json_pure (1.7.5) | |
Installing rubyforge (2.0.4) | |
Installing echoe (4.5.6) | |
Installing email_spec (0.6.2) | |
Installing fakeweb (1.3.0) | |
Installing fastthread (1.0.7) with native extensions | |
Installing ftpfxp (0.0.4) | |
Installing gem_plugin (0.2.3) | |
Installing geokit (1.5.0) | |
Installing hoe (2.6.1) | |
Installing googlecharts (1.3.6) | |
Installing haml (2.2.17) | |
Installing hpricot (0.8.6) with native extensions | |
Installing httparty (0.4.3) | |
Installing mechanize (0.6.7) | |
Installing mongrel (1.0.1) with native extensions | |
Installing newrelic_rpm (2.9.8) | |
Installing nokogiri (1.4.2) with native extensions | |
Installing prawn (0.2.2) | |
Installing rack (1.4.1) | |
Installing rghost (0.8.7.6) | |
Installing rghost_barcode (0.9) | |
Installing rspec (1.2.9) | |
Installing rspec-rails (1.2.9) | |
Installing ruby-hl7 (1.0.3) | |
Installing rubyist-aasm (2.1.1) | |
Installing scruffy (0.2.6) | |
Installing termios (0.9.4) with native extensions | |
Installing thoughtbot-factory_girl (1.2.2) | |
Installing thoughtbot-shoulda (2.11.1) | |
Installing webrat (0.5.3) | |
Using bundler (1.1.5) | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
$ mysql -e 'create database my_app_test;' | |
$ cp ./.travis.database.yml ./config/database.yml | |
$ bundle exec rake db:schema:load | |
(in /home/travis/builds/.../...) | |
rake aborted! | |
Table 'my_app_test.users' doesn't exist | |
(See full trace by running task with --trace) | |
$ mysql -e 'show databases;' | |
+--------------------+ | |
| Database | | |
+--------------------+ | |
| information_schema | | |
| my_app_test | | |
| mysql | | |
| performance_schema | | |
| test | | |
+--------------------+ | |
$ cat ./config/database.yml | |
test: | |
adapter: mysql2 | |
database: my_app_test | |
username: root | |
encoding: utf8 | |
cucumber: | |
adapter: mysql2 | |
database: my_app_test | |
username: root | |
encoding: utf8 | |
$ echo $RAILS_ENV | |
test | |
$ bundle exec rake --version | |
rake, version 0.8.7 | |
Done. Build script exited with: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment