W
W
weare1382015-01-17 22:03:30
ruby
weare138, 2015-01-17 22:03:30

How to make travis-ci and postgresql friends?

Hello guys, I have this problem: I want to link 'travis-ci' to a turnip on github for testing, but when the build starts, the console swears at the wrong config in the database

rake aborted!

Psych::BadAlias: Cannot load `Rails.application.database_configuration`:


Unknown alias: postgresql

here is the database.yml itself
defaults: &defaults
  pool: 5
  timeout: 5000
  encoding: unicode
  adapter: postgresql
  host: localhost

development:
  adapter: postgresql
  encoding: utf8
  database: timonin_development
  pool: 5
  username: postgres

test:
  adapter: postgresql
  encoding: utf8
  database: timonin_test
  pool: 5
  username: postgres

production:
  adapter: postgresql
  encoding: utf8
  database: timonin_production
  pool: 5
  username: postgres

and here is the config for travis, travis.yml
language: ruby
rvm:
  - "2.1.2"
script:
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rake db:test:prepare
  - bundle exec rake
before_script:
  - cp config/database.yml.example config/database.yml
  - psql -c 'create database timonin_test' -U postgres

what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
weare138, 2015-01-18
@weare138

everything is decided, travis glitched

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question