Heroku没有加载谷歌字体

ool*_*ong 14 heroku google-font-api ruby-on-rails-4

我在Heroku上运行一个网站,并且在加载谷歌字体时遇到了一些麻烦.

我的typography.sass文件包含:

@import url(http://fonts.googleapis.com/css?family=Bitter)

h1
  font-family: 'Bitter', Helvetica, serif
Run Code Online (Sandbox Code Playgroud)

我的production.rb文件包含以下行:

config.serve_static_assets = true
config.assets.compile = true
config.assets.digest = true
Run Code Online (Sandbox Code Playgroud)

我的Gemfile包括:

gem 'rails_12factor', group: :production
Run Code Online (Sandbox Code Playgroud)

我已经完成了资产管道的所有Heroku问题,并且我已经将所有图像和css文件正确地加载到生产中,但无论出于何种原因,该字体仅适用于开发.

ell*_*ynz 15

我遇到了同样的问题并找到了答案:

/sf/answers/1275173161/

似乎Heroku想要https.所以投入https解决了我的问题.