0

I've tried several guides on making images and fonts appear on Heroku but none seem to be working. Precompiling then pushing to Heroku and changing images are referenced doesn't seem to work either. Any help would be much appreciated. Full source code here.

For example stylesheets/themes/default/style.css

.iconset {
  background-image: image-url("icon/top-tray.png")  no-repeat;
  background-image: url(image-path('icon/top-tray.png')) no-repeat;
  background-image: asset_path('icon/top-tray.png') no-repeat;
  background: url(<%= asset_path 'icon/top-tray.png' %>) no-repeat;
}

Renders as

.iconset {
  background-image: image-url("icon/top-tray.png")  no-repeat;
  background-image: url(image-path('icon/top-tray.png')) no-repeat;
  background-image: asset_path('icon/top-tray.png') no-repeat;
  background: url(<%= asset_path 'icon/top-tray.png' %>) no-repeat;
}

config/environments/production.rb

  config.serve_static_assets = false
  config.assets.compile = false

config/application.rb

config.assets.paths << Rails.root.join('app', 'assets', 'fonts', 'plugins', 'scss')

config.assets.precompile += %w( .svg .eot .woff .ttf .png .jpg .gif)
Community
  • 1
  • 1
Ace
  • 566
  • 6
  • 19

1 Answers1

0

The solution is to change config.assets.compile = false to config.assets.compile = true in the config/environments/production.rb file.

Cyzanfar
  • 6,997
  • 9
  • 43
  • 81
  • Unfortunately that doesn't work @cyzanfar. The page doesn't fully load and not even the stylesheets. I've edited my question with more details, thanks – Ace Mar 30 '15 at 00:43