Forum: Ruby on Rails DragonFly Object not found in Production

Posted by enrico stano (enricostn)
on 2012-11-05 19:21
(Received via mailing list)
could please anyone help me with this issue?

http://stackoverflow.com/questions/13237954/object...

thanks,

enrico

--
 Enrico Stano

 twitter @enricostano
 skype ocirneonats
Posted by enrico stano (enricostn)
on 2012-11-07 14:28
(Received via mailing list)
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 
methodjust works fine.

Any hint?

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

Thank you

Il giorno luned 5 novembre 2012 19:19:36 UTC+1, enrico stano ha scritto:
Posted by Peter Hickman (Guest)
on 2012-11-07 15:11
(Received via mailing list)
On 7 November 2012 13:27, enrico stano <enricostn@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>
Posted by enrico stano (enricostn)
on 2012-11-08 12:01
(Received via mailing list)
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-...

many thanks for your help!

Il giorno mercoled 7 novembre 2012 15:11:24 UTC+1, Peter Hickman ha
scritto:
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.