Created
January 10, 2017 12:15
-
-
Save williamn/85262f017ec0cc5acb51afedbe4e15cb to your computer and use it in GitHub Desktop.
Capistrano task to run `rails db:seed`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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