Notes about integrating SwitchTower into an existing rails 0.13.1 project. Probably not necessary if using a newer rails versions, since these have SwitchTower already integrated.
Be sure to read the SwitchTower documentation
Integrate SwitchTower into Rakefile
These tasks were taken from a recent Rakefile template from rails svn.
Link the switchtower executable to where the Rakefile tasks expect it:
Support for non-standard ssh ports
Updated. Now the hack isn’t that dirty anymore :-).
Edit /usr/lib/ruby/gems/1.8/gems/switchtower-0.8.0/lib/switchtower/actor.rb and change the connect_to method of class DefaultConnectionFactory like this:
Now simply append SSH_PORT=1234 to your switchtower rake calls, if your ssh server listens to port 1234. Or, if you’re lazy like me, add the following to your Rakefile:
setup remote dir
allow server restart for normal user
add the line