How do I run Rails migrations after Heroku deployment?

Heroku can't do it automatically out of the box, but there's a way around it by using a custom buildpack:

 https://github.com/dsabanin/rake-db-migrate-buildpack.git

To switch your application to this buildpack you can run following command locally:

heroku config:set BUILDPACK_URL=<span style="font-size: 12.7272720336914px; line-height: 20.8000011444092px;">https://github.com/dsabanin/rake-db-migrate-buildpack.git</span>

Still need help? Contact Us Contact Us