【发布时间】:2017-04-17 02:36:17
【问题描述】:
这是我在 Heroku 上的应用 https://forks-app.herokuapp.com/ 我在网上看过,但我不确定我是否需要带有 rails 5 的 image_tag。 谁能建议如何让它显示?
【问题讨论】:
标签: html css heroku ruby-on-rails-5
这是我在 Heroku 上的应用 https://forks-app.herokuapp.com/ 我在网上看过,但我不确定我是否需要带有 rails 5 的 image_tag。 谁能建议如何让它显示?
【问题讨论】:
标签: html css heroku ruby-on-rails-5
是的,您需要图像标签。
但更大的问题是 Heroku 不会在其服务器上存储图像(或者至少不会长时间存储)。您需要为此提供外部存储服务 - 例如亚马逊 S3。
有关设置 Amazon S3 的指南,请参阅 https://devcenter.heroku.com/articles/s3。
【讨论】: