Skip to content

Instantly share code, notes, and snippets.

@domchristie
Created September 26, 2013 12:45
Show Gist options
  • Save domchristie/6713650 to your computer and use it in GitHub Desktop.
Save domchristie/6713650 to your computer and use it in GitHub Desktop.
Runs database migrations whilst playing the amen break.
# lib/tasks/db.rake
namespace :dnb do
task :migrate do
pid = spawn("afplay #{File.join(Rails.root, 'lib', 'tasks', 'assets', 'amen_break.wav')}")
Rake::Task["db:migrate"].invoke
Process.wait(pid)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment