Execute a task before the Rake default task 11 September 2014 - Ruby Ruby / Rake I wanted the db:test:load task to be run before running the default bundle exec rake task, the key is to define a task and declare it as a dependency in your Rakefile: # also reload data before running test task :test => 'db:test:load'