Hi Stefan,
thanks for pointing out the problem.

I didn't notice it because I no longer use the standard Capistrano restart
task since I switched all my servers to Apache + mod_passenger. I created a
custom recipe to overwrite the default start/stop/restart tasks accordingly.
http://www.simonecarletti.com/blog/2008/12/capistrano-deploy-recipe-with-passenger-mod_rails-taste/

As you wrote, it would make sense to determine the current Rails version and
skip the restart task unless RAILS_GEM_VERSION < 2.3.
The RAILS_GEM_VERSION is already available in the Capistrano environment
because Capistrano loads Rails environment on boot.

If the RAILS_GEM_VERSION >= 2.3, I would simply print a message that tells
the user to overwrite the method with a custom implementation. The message
can also provide a list of available recipes/plugins with the most common
restart implementation.

Finally, I think Capistrano should be smart enough to echo a kind of
deprecation warning if the Rails version belongs to the 2.2 branch and is
lower than 2.3. This would prepare users in case of the project is going to
be upgraded.

What do you think?


-- 
Simone Carletti

Site & Blog: http://www.simonecarletti.com
Email: [email protected]
LinkedIn: http://linkedin.com/in/weppos
Nick: weppos | Skype: weppos

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to