This one was super complicated until it got super easy. If you're deploying with Heroku, as of 2017 they now do SSL certification for you...for free.
Throw this bad boy into command line:
$ heroku certs:auto:enable -a <app name>
And then double check your domains like this:
Afterwards, you can use this guy to check to make sure it worked.
You might have to enable SSL on whatever site hosts your domain, which could take a day or so to take effect. You can check to see if this is necessary when you do
heroku certs:auto if any of the statuses say "failing".
If you then want to have people default to the https version of the site, add (or uncomment...it comes commented in Rails 5.2) the following code in
config.force_ssl = true