Serving up static sites on heroku - redux
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.
| |
| |
This assumes you have a directory structure similar to the following :
.
|-- config.ru
`-- public
|-- index.html
|-- css
`-- images