DragonFly Object not found in Production

could please anyone help me with this issue?





I just realized that relative links like

I’m a relative link

generate URLs like www.mysite.it/media/etcetc

while they should generate


This happens only for relative links, for example Rails’ link_to method just works fine.

Any hint?

I was following the Passenger official guide to deploy a Rails 3.x to a subfolder.

Thank you

If it starts with a / is is not a relative link, it is an absolute link. Try

<a href="media/etcetc">I'm a relative link</a>


I understand your point, but it doesn’t apply with things like DragonFly @model.file.url that resolve in /media/etcetc

But it seems an Apache/Passenger issue while deploying to a subdirectory… deploying to Heroku just works fine

I’ve changed a bit the issue on SO ruby on rails - wrong URLs deploying to a subdirectory - Stack Overflow

many thanks for your help!