interlocking rubyonrails with heroku~aws (ec2)

Asked 2 years ago, Updated 2 years ago, 73 views

The homepage that Rails created We launched it using heroku.

** The address is https://practicerails5.herokuapp.com/

But when I upload my image and refresh it, The image is X-displayed and cannot be loaded

So I want to use aws service to store images. (Currently created ec2 bucket.)

But I don't know how.

So what I want is When you restart or refresh the server, I want to put the image that I posted (stored in aws and loaded here url) right.

Is there any way?

ruby-on-rails heroku aws ec2

2022-09-22 21:14

1 Answers

I can save and use files in AWS' S3, so I use them to upload images. You can use carrierwave and fog with rails and upload them to s3. Google it with the related search term (rails carrierwave fogs3) and the data will come out. Or see here. I also referred a lot when I first studied rails. Here's a tutorial using Heroku and s3. https://rorlab.gitbooks.io/railsguidebook/content/appendices/aws_s3.html


2022-09-22 21:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.