I was thinking that DirHandler or RailsHandler would be the answer but I can't seem to figure out what to do with them. The RDoc is, um... Let's say "terse". And there's nothing [that I saw] on the main site. Any chance you've seen a good breakdown/tutorial/whatever somewhere online?
<br><br>RSL<br><br><div><span class="gmail_quote">On 10/31/06, <b class="gmail_sendername">Jan Svitok</b> <<a href="mailto:jan.svitok@gmail.com">jan.svitok@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 10/31/06, Russell Norris <<a href="mailto:rsl@swimcommunity.org">rsl@swimcommunity.org</a>> wrote:<br>> Howdy. I'm working on a RoR CMS and need cached pages to all be in<br>> public/cache rather than public [in order to set svn:ignore on all the files
<br>> properly]. I can get page_cache_directory set correctly and the pages are<br>> cached in the right place but Mongrel isn't serving them because it's only<br>> looking for them in public. During development I know I can set -r
<br>> public/cache but doing that means that the images and stylesheets don't get<br>> picked up. I'm sure there's a way to tell Mongrel to look in both places or<br>> at least to serve assets from public and cached pages from public/cache.
<br>> Isn't there?<br>><br>> Thanks in advance.<br><br>I'm not sure if any of these will work, they're just hints:<br><br>1. try prepend DirHandler mounted to public/cache :in_front of rails<br>handler using -S switch
<br> uri "/", :handler => Mongrel::DirHandler.new("/public/cache", false)<br> This will unfortunately not look for PATH_INFO + '.html' files.<br><br>2. try patching RailsHandler to look also in cache. For that a proxy handler
<br> would be useful - one that will hold more DirHandlers and will<br>delegate to whichever<br> wants to serve the particular file. In this case RailsHandler will<br>take care of +.html files.<br> You'd need to implement new, can_serve? and process which seems pretty easy.
<br>_______________________________________________<br>Mongrel-users mailing list<br><a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/mongrel-users">
http://rubyforge.org/mailman/listinfo/mongrel-users</a><br></blockquote></div><br>