In config/environments/production.rb, try setting the following:
config.action_view.cache_template_loading = trueBy default, any time a template's mtime changes, Rails will reload the template, even in production. And since the symlink is changed before the mongrels are restarted, there is a window of opportunity there for the existing mongrels to see the template has changed and load it.
By setting cache_template_loading = true, Rails will only load a template once. The only way to update a template, then, is to restart your mongrels, but it _should_ take care of the issue you are seeing.
- Jamis On Nov 27, 2006, at 5:59 PM, Chris Wanstrath wrote:
Hey cappers,I checked the archives but couldn't find anything on this issue, though I swear I saw it discussed someplace somewhere at some point...Anyway, when we cap deploy code which uses new helper methods, page loads will always 500 for a short amount of time. It goes like this:-> write new helper methods, add them into rhtml, commit -> deploy -> visit page which uses new helper methods -> 500 error: new helper method not found -> wait a moment, refresh -> page loads fineSo, it's as if the rhtml templates are updated before the rest of the code is updated. We can get this to happen on demand, without fail.Is there some sort of trick I'm missing to make sure my update / restarts / deploys are more atomic? I don't want to disable_web every time I deploy -- I just want cap to do its business, switch the symlink, then restart. I suppose this might be indicative of a bigger issue with our setup, though.Oh, and we have three machines with 8 mongrels on each. Deploys take a few seconds.Any help is much appreciated. -- Chris Wanstrath http://errtheblog.com --~--~---------~--~----~------------~-------~--~----~To unsubscribe from this group, send email to capistrano- [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/ group/capistrano-~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature
