Reputation: 1515
When i run the website locally, it works fine.However, after pushing to heroku, its displaying as a broken image
The pictures are in my /assets/images/ folder
images are called in my static page like this
<img src="assets/blank_avatar_male.jpg" alt="blank_male_avatar">
Ive tried changing the path to /assets/images/jpeg and it and repushed. No luck so far. Any suggestions on how to fix this?
Upvotes: 0
Views: 167
Reputation: 37507
My guess is that you don't have config.serve_static_assets
set to true in your production.rb
file.
The simplest solution is to include the rails_12factor
gem which will do this for you
Upvotes: 2
Reputation: 3400
try compiling your assets locally like this:
RAILS_ENV=production bundle exec rake assets:precompile
and then push to heroku
Upvotes: 0