Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Run the Travis tests on MySQL, Postgres and sqlite #170

wants to merge 2 commits into from

3 participants


No description provided.


Odd error from Travis, it's complaining the Gemfile is invalid, but it hasn't changed.


That probably means there's a syntax error in the database.yml file instead.

@andyw8 andyw8 referenced this pull request from a commit
@yaf yaf Move comment queries to scopes fa14aac

Ok I just saw there is some custom code in the Gemfile which parses the database.yml. As the configuration uses an environment variable on Travis, I'm trying to think how this will work.

mvz commented

One way to solve this may be to add a special Gemfile.travis.


I'd be worried about that getting out of sync with the main Gemfile.

fdv commented

We now run Travis build on the 3 database engines, so I'm closing that pull request. Thank you for submitting.

@fdv fdv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 30, 2013
  1. @andyw8
Commits on Mar 31, 2013
  1. @andyw8

    Missing semicolon?

    andyw8 authored
This page is out of date. Refresh to see the latest.
Showing with 34 additions and 2 deletions.
  1. +9 −2 .travis.yml
  2. +25 −0 config/database.yml.travis
11 .travis.yml
@@ -1,7 +1,14 @@
language: ruby
- 1.9.3
+ - DB=sqlite
+ - DB=mysql
+ - DB=postgresql
- - cp config/database.yml.pgsql config/database.yml
+ - cp config/database.yml.travis config/database.yml
- - rake db:create db:migrate
+ - mysql -e 'create database typo_test;'
+ - psql -c 'create database typo_test;' -U postgres
+ - bundle exec rake db:migrate test
25 config/database.yml.travis
@@ -0,0 +1,25 @@
+sqlite: &sqlite
+ adapter: sqlite3
+ database: db/<%= Rails.env %>.sqlite3
+mysql: &mysql
+ adapter: mysql2
+ username: root
+ password:
+ database: typo_<%= Rails.env %>
+postgresql: &postgresql
+ adapter: postgresql
+ username: postgres
+ password:
+ database: typo_<%= Rails.env %>
+ min_messages: ERROR
+defaults: &defaults
+ pool: 5
+ timeout: 5000
+ host: localhost
+ <<: *<%= ENV['DB'] || "postgresql" %>
+ <<: *defaults
Something went wrong with that request. Please try again.