Skip to content

Instantly share code, notes, and snippets.

@williamn
Created January 10, 2017 12:15
Show Gist options
  • Save williamn/85262f017ec0cc5acb51afedbe4e15cb to your computer and use it in GitHub Desktop.
Save williamn/85262f017ec0cc5acb51afedbe4e15cb to your computer and use it in GitHub Desktop.
Capistrano task to run `rails db:seed`
namespace :deploy do
desc "reload the database with seed data"
task :seed do
on roles(:all) do
within current_path do
execute :bundle, :exec, 'rails', 'db:seed', 'RAILS_ENV=production'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment