I have spent the better part of the day trying to get images to load on my heroku app. Everything I try works locally, but not after being deployed to heroku.
I have png files saved in the images folder under my assets. I am referencing these images with syntax in my css such as;
#signin {
background: url(<%= asset_path 'sf.png' %>);
background-size: 100%;
}
In heroku when I inspect the background the assets/sf.png link is there but when you click it it shows a broken image, suggesting it did not load properly.
I've tried toggling config.serve_static_assets = false
in the production.rb
file between true and false and neither works.
I also have
group :production do
gem 'pg'
gem 'rails_12factor'
end
Precompile is always successful.
Rails 4. Any ideas on what else to try?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…