DragonFly Object not found in Production

34 views
Skip to first unread message

enrico stano

unread,
Nov 5, 2012, 1:19:33 PM11/5/12
to phusion-...@googlegroups.com, rubyonra...@googlegroups.com
could please anyone help me with this issue?

http://stackoverflow.com/questions/13237954/object-not-found-in-production

thanks,

enrico

--
· Enrico Stano
·
· twitter @enricostano
· skype ocirneonats

enrico stano

unread,
Nov 7, 2012, 8:27:41 AM11/7/12
to phusion-...@googlegroups.com, rubyonra...@googlegroups.com
so...

I just realized that relative links like

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

generate URLs like

www.mysite.it/media/etcetc


while they should generate

www.mysite.it/copisteria/media/etcetc

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

Peter Hickman

unread,
Nov 7, 2012, 9:10:40 AM11/7/12
to rubyonra...@googlegroups.com
On 7 November 2012 13:27, enrico stano <enri...@gmail.com> wrote:
so...

I just realized that relative links like

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


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>

enrico stano

unread,
Nov 8, 2012, 6:00:21 AM11/8/12
to rubyonra...@googlegroups.com, peterhi...@googlemail.com
Hi,

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 http://stackoverflow.com/questions/13237954/wrong-urls-from-relative-links-deploying-to-a-subdirectory

many thanks for your help!
Reply all
Reply to author
Forward
0 new messages