Forum: Ruby on Rails SwitchTower bugs: shared_dir, before_setup?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
joseph.moore (Guest)
on 2005-12-07 06:29
(Received via mailing list)
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
jamis (Guest)
on 2005-12-07 17:22
(Received via mailing list)
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
sam.kirchmeier (Guest)
on 2005-12-07 18:39
(Received via mailing list)
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.
joseph.moore (Guest)
on 2005-12-07 23:13
(Received via mailing list)
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
jsierles (Guest)
on 2005-12-07 23:22
(Received via mailing list)
There is no default rake task for setup. You need to run:

switchtower -r config/deploy -a setup

Joshua Sierles
jamis (Guest)
on 2005-12-08 01:46
(Received via mailing list)
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
This topic is locked and can not be replied to.