First off, I should probably tell you that I totally ♥ Heroku. I run a bunch of little apps off it and at work believe it’s production ready for our main platform. A while back someone posted a nice little snippet of how to get a static site working on it in two lines of code on heroku, however, with some change in heroku, gem packaging or the like (or fact I added in multiple custom domains for the site), these static served pages suddenly stopped working. Counterintuitive when looked at, and even @radar and I together looking at it couldn’t figure it out. Anyhow, I puzzled the following out. Probably a few of the gems can be removed but this definitely worked for me.

# .gems*

rack-rewrite --version '&gt;= 1.0.0'
# config.ru*

gem 'rack-rewrite', '~&gt; 1.0.0'
require 'rubygems'
require 'rack'
require 'rack/rewrite'
require 'thin'

use Rack::Static, :urls =&gt; [&quot;/css&quot;, &quot;/images&quot;, &quot;/index.html&quot;, &quot;/contact.html&quot;, &quot;/home.html&quot;, &quot;/password.html&quot;], :root =&gt; &quot;public&quot;

use Rack::Rewrite do
rewrite '/', '/index.html'
end

run Rack::Directory.new('public')

This assumes you have a directory structure similar to the following :

.
|-- config.ru
-- public
|-- index.html
|-- css
-- images

815a80b @ 2020-08-10