Viktor Emilov


50 Experience
0 Lessons Completed
0 Questions Solved


I have Ruby On Rails (version 6) app deployed in DigitalOcean, I am using ActionText for the images, the images are stored in DOSpaces.

I display them in the following way in file _blob.html.erb <%= image_tag "{blob.key}", width:"75%" %>.

So the problem is every time when I push new changes to GH, and automated deployment to DO is finished, the image URLs are changing from


When I upload an image from browser it's ok, but after every time I push to GH their URLs are changing and then I got code 404 for all of them.

Do you know why this happens? How can I avoid this from happening and what do you think is the best practice in this sort of situation?

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2023 GoRails, LLC. All rights reserved.