running rails app on heroku, can't see static pages in /public folder

前端 未结 3 1264
囚心锁ツ
囚心锁ツ 2020-12-17 16:56

I have a couple static pages which when running locally work as localhost:3000/foo.html, but this doesn\'t work once uploaded to heroku.

I tried adding the following

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 17:13

    This baffled me for hours, but here's another potential solution. For some reason, I could generate documentation into /public/docs, but the documentation would not load, even immediately after I generated it. I would run a Heroku bash console, generate the documentation, exit, then re-run Heroku bash only to find that /public no longer contained my docs folder.

    So, the only solution I found was to include the documentation in the Git repository. That was the only way that Heroku persisted /public/docs across deploys and bash instances.

    I have no idea why this is... I opened a support ticket with Heroku and am awaiting a response.

提交回复
热议问题