Switchtower changes
Just a note to people who may have run into the same problem: I had been running an old version of Switchtower (from back when it was announced but only available via SVN), and recently upgraded to using the gem. Here's the process of migrating for any of you who had been on the bleeding edge and want to get up to date now:
- Remove the vendor/switchtower.rb and vendor/switchtower directory. (I'm assuming this is where you installed it - it should have been.)
- Remove scripts/switchtower
- Download and install the Switchtower gem
- Make a backup copy of config/deploy.rb just in case.
- Run 'switchtower --apply-to your_rails_app_dir' - Do NOT overwrite your config/deploy.rb recipes!
You should be ready to go. However, the first time I deployed I ran into some weirdness in my custom deploy task. I was referring to current_release to do some symlinking and chmodding. If your old switchtower labelled releases with an integer number and you refer to current_release in your customized tasks, you may run into the same problem. Switchtower was picking up one of my old release directories as the current_release (it was something like 355), I'm assuming because numerically it looks "more recent" than the release it just checked out (into the new timestamp format - something like 20051214XXXXX). I had to rename the old release directories so they wouldn't be picked up as "newer" _and I also modified my task to refer to release_path instead of current_release (since I was using it for the path anyhow).
About this entry
You’re currently reading “Switchtower changes,” an entry on Late to the Party by Chris
- Published:
- 6pm on 12/19/05
- Categories:
- Rails, Programming, Ruby
No Comments
Jump to comment form | comments rss | trackback uri