Rails: problem locating asset following fly-deploy

Hi! I’m just trying to deploy a test Rails app and now get this error after what I thought was a successful fly-deploy:

“We’re sorry, but something went wrong.”

In the log file, I read that

ActionView::Template::Error (The asset "sparky-in-the-sink" is not present in the asset pipeline.

This is after I installed ‘sparky-in-the-sink.jpg’ into the Rails folder ‘app/assets/images’.

If I refer to the image with

<%= image_tag("sparky-in-the-sink", {:style => "width:300px;"}) %>

Everthing works ok when I start Rails in development on my localhost.

I guess this falls under the Rails 7 asset pipeline category which seems a complex topic.

I did find “Making Sense of Rails Assets · Fly” but I’m not sure this helped me make sense of my particular image problem.

Anyone have an idea on how to fix, or least learn more?

Thank you!

Sounds like rails assets:precompile wasn’t run. Are you using a Dockerfile? Can you run Getting Started · Fly Docs to the point of the first deploy?

Oh yes in fact I’m pretty sure that’s exactly the tutorial I’ve been following. After adding turbo streams, I did rails db:migrate, and fly-deploy. I then tried adding the image I described above. Then I got the errors.

I do have a Dockerfile in the root of my project as per the tutorial.