Question about updating files in production / Mongrel restart

Hello,

I just completed my first real rails application. I successfully deployed it, configured apache/mongrel clusters, etc. However, I do need to make code changes on the site often. I noticed the only time the change takes effect is when mongrel is recycled. Is there anyway around that? I know best practice is to do scheduled updates...etc. But this s a small site that will have need frequent updates. I read up on Capistrano a bit, but it seems that part of its steps is a mongrel restart. Is this really the only way?

Thanks!

I don't think you have another choice if you're using mongrel, however, I've never deployed mongrel clusters, always used passenger.

In production mode, the classes are all cached on load. This is for performance reasons. In development mode, the classes are reloaded on each request which enables you to see your changes immediately. That being said, changes to routes or the environment files would still not reload. Generally speaking restarting your mongrel/passenger instances is the best approach. If you are less concerned for performance you could run in production with caching disabled, though I would advise against it. Even for a small site, Capistrano is simply to setup & well worth doing. Also, dump Mongrel & use Enterprise Ruby & passenger.... it is so much less of a headache to manage for deploys & manages memory much better you'll appreciate the change.

Niels

great! i will look at that. Thanks!