Skip to content

Instantly share code, notes, and snippets.

View edmorley's full-sized avatar

Ed Morley edmorley

View GitHub Profile
@pat
pat / README.md
Last active December 17, 2021 09:45
Using MySQL 5.7 libraries on Heroku

Edit 2021-02-21: I've confirmed this solution works with both heroku-18 and heroku-20 stacks.


What follows is my solution for having mysql2 gem compiled and working against MySQL v5.7 (rather than v8+) on the heroku-20 stack. This is how I've managed to make it work:

  • Add the apt buildstack ahead of your standard buildpack (in my case, that's Ruby):
$ heroku buildpacks:add --index 1 heroku-community/apt