[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PhillyOnRails] rails fastcgi issues
|
Hi,
Yes I have my apps running under /opt/appname on a debian box. I made a couple of small functions that addressed exactly this as a temporary solution. I was hoping to find a more elegant method when I started finishing up the dev cycle. Here they are and I hope it helps:
#~ Uses RAILS_ROOT to determine the path to the public directory def rails_public RAILS_ROOT.gsub('/config/..', '/public/') end #~ relative pathway to the rails app for the passed absolute path
#~ /opt/appname/public/assets/1/gallery/3 transforms to /assets/1/gallery/3 def relative_url(abs_path) abs_path.gsub(rails_public, '/') end
Let me know if that helps at all.
On 2/28/07, Aaron Mulder <
ammulder@alumni.princeton.edu> wrote:
On 2/28/07, Joe Cairns <joe.cairns@gmail.com> wrote: > I had fastcgi problems and could never fully solve them. I switched to
> using Apache2, mod_proxy, and mongrel using this setup and never looked
> back: > http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel
Have you done it where the proxy is less than the entire root directory? e.g. have /foo on the Apache server go to "/" or "/foo" on the Rails servers? My first stab at this didn't work because all the
links in the pages to stylesheets, etc. were absolute links on the Rails side, which didn't fall into the required "/foo/*" context on the Apache side. If there was an easy way to make them relative links
or set up the routing appropriately on the Rails side that would be great.
Thanks, Aaron
> On 2/28/07, Michael Scappa <
mscappa@verveinternet.com
> wrote: > > > > > > > > > > Any light someone can shed on this would be a big help. > > > > > > > > I'm having a ton of trouble getting rails to work with apache + fastcgi on
> a plesk 8 server. Mongrel/webrick work totally fine. > > > > > > > > I keep getting routing errors: > > > > > > > > no route found to match "/test" with {:method=>:get}
> > > > > > > > when trying to access anything besides the index page. > > > > > > > > Does anybody had experience getting this set up correctly?
> > > > > > > > - Mike > > _______________________________________________ > > To unsubscribe or change your settings, visit: > >
http://lists.phillyonrails.org/mailman/listinfo/talk > > > > > > > _______________________________________________ > To unsubscribe or change your settings, visit: >
http://lists.phillyonrails.org/mailman/listinfo/talk > > _______________________________________________ To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk
|
|