Using nulldb still runs db:schema:load #3

canonical opened this Issue Nov 2, 2010 · 2 comments


None yet

3 participants


I hope this isn't "operator error" on my part...

I have activerecord-nulldb-adapter (0.2.1) installed, but when I run "rake spec" it still executes db:schema:load -- which in my environment takes a ridiculously long time. I'm using rails 3.0.1 and rspec 2.0.1.

I have these lines in my spec_helper.rb file right under require 'rspec-rails'
require 'nulldb_rspec'
include NullDB::RSpec::NullifiedDatabase

is running db:schema:load expected behavior? Can I configure it so that doesn't happen?

(in /Users/joemcglynn/RubymineProjects/rails_lists/rails_experiment_2)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load


I don't believe NullDB does anything specific to prevent db:schema:load, but it does patch the database tasks a bit to turn db:test:purge into a no-op. See here. You should be able to do something similar for db:schema:load. Want to try it out and submit a patch if that works?


Is this still an issue @canonical?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment