Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

TL/DR: I need a way to run tests without dropping the target database.

I have two instances of a Heroku-Postgres database: 'app-dev' and 'app-test'. I would like to use them for development and testing a new Rails 4 app. The development DB works as expected, but the test database cannot be used in the way one would usually work with a local PG database.

When trying to run tests via rake db:test:prepare --trace I get an error that boils down to:

db:load_config
db:test:purge
rake  aborted!
FATAL:  permission denied for database "postgres"       
DETAIL:  User does not have CONNECT privilege. 

This is because heroku does not allow the dropping of databases. So my question would be: how to run these tests without dropping the whole database and instead dropping just the database objects? Custom rake task? Toolbelt command?

share|improve this question
add comment (requires an account with 50 reputation)

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.