First time here, so I hope this isn’t a FAQ (although I did check the faq).
I’m using mongrel_cluster with --prefix, and it is very slick. Thanks
for that. But I had one problem. At one point in my little app, I
have something like this:
In this scenario, the modified prefix behavior causes the prefix to
be added twice. I get this output:
http://mysite/my-prefix/my-prefix/picture/1
I may be doing this wrong. It does work properly without --prefix in
the mix, and i can see how both these methods might add the prefix,
causing this problem. Is this a bug? Known problem? Limitation of –
prefix? Or just a confused poster?
I had to modify image_tag and add in a “nostrip” attribute. If there’s
a better way, please post it up.
Would it be reasonable to check if source already begins with the
prefix, and not prepend it in that case? I realize this would fail in
some rare cases, but my guess is it would be the right behavior a
majority of the time, and when it isn’t you could work around it,
perhaps with a “force” attribute or something similar, or simply by
hard-coding the url.
As it is now, you need a workaround for a typical case. With this
change, I think you would need a workaround for an atypical case.
Does that make sense? I can patch it if there’s some consensus that
it would be a worthwhile patch.
actually I thought this was on a different list. My solution solves a
rails issue that I had, and isn’t really meant for mongrel
specifically, so as I said, there may be something better.
I was actually fixing the rails problem of using the incorrect path
since my rails application is tacked onto an existing server. I needed
to serve images from within the rails app and from the root of the
server using image_tag, which my solution allows.
Enable serving of images, stylesheets, and javascripts from an asset