SwitchTower bugs: shared_dir, before_setup?


#1

I installed SwitchTower yesterday and had a couple of problems. I’m
not sure if they are known bugs, but if not, FYI; of course it’s
possible that I missed something.

1 - SwitchTower did not create the “shared” directory by default as
stated in the documentation. More importantly, the shared/log
directory was not created automatically, which is problematic since
SwitchTower created symbolic links to this directory.

Setting the shared_dir variable explicitly in the deploy.rb file did
not fix this. As a result the application would not start until we
manually created the ourapp/shared/log directory.

2 - According to the documentation, we have many after_ and before_
tasks. Thus we attempted to work around the non-creation of the
shared_dir by implementing after_setup in config/deploy.rb.

No dice â?? it was never executed; maybe we needed to explicitly call it
somehow, be we haven’t figured it out yet (please let me know if you
know how). We ended up implementing after_update_code instead.

– Joe


#2

On Dec 6, 2005, at 9:27 PM, Joseph M. wrote:

I installed SwitchTower yesterday and had a couple of problems. I’m
not sure if they are known bugs, but if not, FYI; of course it’s
possible that I missed something.

Did you explicitly run the ‘setup’ task? If so, were there any errors?

  • Jamis

#3

Jamis –

We tried, but maybe we’re not running it correctly:


$ cd blah/project
$ rake setup
(in /home/blah/project/)
rake aborted!
Don’t know how to build task ‘setup’

– Joe


#4

On 12/6/05, Joseph M. removed_email_address@domain.invalid wrote:

Setting the shared_dir variable explicitly in the deploy.rb file did
not fix this. As a result the application would not start until we
manually created the ourapp/shared/log directory.

This might not be related, but it’s something to watch out for:
shared_dir is different than shared_path. shared_dir is the name of
the shared directory (such as “shared”), while shared_path is the full
path for that directory (such as “/ourapp/shared”). I was bitten by
that, but I’ve found SwitchTower to be good about reporting errors
during tasks as Jamis mentioned.


#5

There is no default rake task for setup. You need to run:

switchtower -r config/deploy -a setup

Joshua Sierles


#6

On Dec 7, 2005, at 2:10 PM, Joseph M. wrote:


There’s no rake task for the setup. You can access it using the
‘remote_exec’ task:

rake remote_exec ACTION=setup

Only a few of the ST tasks have corresponding rake tasks (deploy,
rollback).

  • Jamis