Mike Zornek on 11 Dec 2005 20:36:06 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] Deployed app still needs umph

So tonight I deployed my first "real" rails app. It's an app that runs the
website of my new consulting business. Overall I like it but I'm still
working out some kinks...


Caching is one kink. I'm using page caching for some of the obvious static
pages. It works well for the most part but doesn't work (as I remember
reading once) when a trailing slash is added. For example, when you visit
the services page from this url [1] you'll get the static variant, while
this url [2] regenerates the page from scratch (a markdown file plus some
other magic) -- a process that is noticeably slower.

[1]: http://clickablebliss.com/services
[2]: http://clickablebliss.com/services/

Has anyone figure out a way to fix this?

Also on the issue of page caching, so rails by default wants to write these
static files in the /public directory. I don't know how conformable I am in
making the entire website root writable by www. That seems to go against the
whole idea of running Apache as a user who can't do anything. Any thoughts?

The next thing I need to look into is fragment caching for the blog part of
the site. It doesn't look like it will be nearly as transparent as I'd hoped
it would be. Nothing really to say on this just yet, just putting it out
there in case anyone has any advice.

The finally BIG issue I'm having is the running environment. I'm using
Apache with FastCGI. In my Apache httpd.conf file I am configuring fastcgi
with something like:

<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc
FastCgiServer /webserver/cbwebsite/releases/rel29/public/dispatch.fcgi \
    -initial-env RAILS_ENV=production -processes 5 -idle-timeout 120

I'm clearly telling FastCGI to run in production but for some reason it
never makes it to the app and it runs in development mode. Temporarily I've
uncommented the one line in the environment.rb file and told it to use
production mode specifically. Any clue why this isn't working. I pretty much
copied it right from the Rails book.

Thanks in advance for you help.

~ Mike

talk mailing list