简体   繁体   中英

Ruby on Rails / Heroku Images not rendering in a staging application

I have a ruby on rails app running in heroku, to render images in the config/production.rb I entered this config.serve_static_assets = true config.assets.compile = true and I was able to see my images fine, when I created a test app the images were not being rendered. Got any suggestions? I am rendering the images ">

If you are upload images and wants to display it on Heroku application then it won't be happen because heroku is readonly system. You have to upload images to another server like AWS S3 or cloudinary using paperclip/carrierwave gem.

感谢您提供的所有帮助,忘记了我的测试数据库的种子,感谢您的所有帮助,我们非常感谢

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM