Ask A Question


You’re not receiving notifications from this thread.

Why the automated deployment from GitHub to DigitalOcean, will change the image urls in my RubyOnRails app?

Viktor Emilov asked in Rails

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?

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,168+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.