# Switchtower Error

**URL:** <https://www.ruby-forum.com/t/switchtower-error/99658>\
**Category:** Rails\
**Created:** [February 1, 2006, 6:20am UTC](https://www.ruby-forum.com/t/switchtower-error/99658 "2006-02-01T06:20:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 6:20am UTC](https://www.ruby-forum.com/t/switchtower-error/99658/1 "2006-02-01T06:20:30Z")

</div>

This is my deploy file

set :application, “varcasa stage”  
set :repository, “file:///c:/svnrepo/thenali/trunk”

# 

=============================================================================

# ROLES

# 

=============================================================================

# You can define any number of roles, each of which contains any number

of

# machines. Roles might include such things as :web, or :app, or :db,

defining

# what the purpose of each machine is. You can also specify options that

can

# be used to single out a specific subset of boxes in a particular role,

like

# :primary =\> true.

role :web, “[varcasa.com](http://varcasa.com)”  
role :app, “[varcasa.com](http://varcasa.com)”

When I try to do “setup” from my local system I am getting this  
following  
error

rake aborted!  
getaddrinfo: no address associated with hostname.  
./lib/tasks/switchtower.rake:17:in `switchtower\_invoke’

Any Ideas?

–

Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project. Powered by Typo and soon by RForum too

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 8:12am UTC](https://www.ruby-forum.com/t/switchtower-error/99658/2 "2006-02-01T08:12:23Z")

</div>

Siva J. wrote:

> This is my deploy file
> 
> set :application, “varcasa stage”  
> set :repository, “file:///c:/svnrepo/thenali/trunk”

During deployment a source code checkout (or export) is needed from the  
deployment machine. This is not possible if our repository is accessible  
only trough the local “file://”.

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 3:08pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/3 "2006-02-01T15:08:22Z")

</div>

On Jan 31, 2006, at 10:17 PM, Siva J. wrote:

> This is my deploy file
> 
> set :application, “varcasa stage”  
> set :repository, “file:///c:/svnrepo/thenali/trunk”

SwitchTower does not work with file:// repositories. Please use  
svn://, svn+ssh://, or http://.

- Jamis

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/4 "2006-02-01T16:38:42Z")

</div>

On Wednesday, February 01, 2006, at 7:06 AM, Jamis B. wrote:

> - Jamis

It is not the case in this setup but ‘file://’ should work if the  
repository and the server are on the same host. In fact that was the  
only way I could make it work without the need to enter the password  
during the deployment.

Roustem

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 6:52pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/5 "2006-02-01T18:52:06Z")

</div>

My server is hosted by Dreamhost and subversion is running in my local  
system.

When I started my subversion server and changed my svn repository

set :repository, [http://localhost/thenali/trunk](http://localhost/thenali/trunk)

It prompted me for password. but when I entered my password for the  
server.  
Rake just aborted without giving any error message

Having --verbose option didnt help either

any idea?!

On 1 Feb 2006 15:35:59 -0000, Roustem K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > SwitchTower does not work with file:// repositories. Please use svn:/  
> > Roustem
> 
> –  
> Posted with [http://DevLists.com](http://DevLists.com). Sign up and save your time!
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project. Powered by Typo and soon by RForum too

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 7:43pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/6 "2006-02-01T19:43:33Z")

</div>

oh okay that makes sense

## I will try to give my ip address and try later this evenin and let you know

Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project.  
Education Through Collabration

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 1, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/7 "2006-02-01T19:16:17Z")

</div>

On Wednesday, February 01, 2006, at 12:50 PM, Siva J. wrote:

> Having --verbose option didnt help either
> 
> any idea?!

Siva,

Unfortunately, this configuration will not work for you – there is not  
way for Dreamhost server to connect to your repository if you specify  
‘localhost’.

You need to use real domain name. To validate that your repository name  
is correct, you should be able to run 'svn checkout  
’ command on the Dreamhost server.

Roustem

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 5:41am UTC](https://www.ruby-forum.com/t/switchtower-error/99658/8 "2006-02-14T05:41:53Z")

</div>

Still I have no success with SWitchtower setup in Dreamhost.

I have no idea what I am doing wrong.

My setup

Stage Domain → [stage.varcasa.com](http://stage.varcasa.com)  
Prod Domain → [varcasa.com](http://varcasa.com)

StageDB → varcasatest  
ProdDB → varcasa

Production is running some dispatch.fcgi processes.

I want to first test in stage and then move to production.

My deploy.rb

set :user, ‘sivajag’

> set :application, “varcasa”  
> set :repository, "  
> svn+ssh://removed\_email\_address@domain.invalid/home/sivajag/svn/varcasa/varcasa"  
> role :web, “[stage.varcasa.com](http://stage.varcasa.com)”  
> role :app, “[stage.varcasa.com](http://stage.varcasa.com)”  
> role :db, “[stage.varcasa.com](http://stage.varcasa.com)”, :primary =\> true

set :deploy\_to, “/home/#{user}/stage.varcasa.com”

desc “Restart the FCGI processes on the app server as a regular user.”

> task :restart, :roles =\> :app do  
> #run “killall -9 dispatch.fcgi”  
> run “chmod 771 #{current\_path}/script/process/\*”  
> run “#{current\_path}/script/process/reaper”  
> end

I want to setup stage without restarting prod dispatch.fcgi processes.

rake setup \> run successfully and setup files on remote environment

rake deploy \> failed

this is the error I am getting

> [[stage.varcasa.com](http://stage.varcasa.com)] executing command  
> nt/public/dispatch.fcgi  
> [out :: [stage.varcasa.com](http://stage.varcasa.com)] Couldn’t find any process matching:  
> /home/sivajag/stage.varcasa.com/curre  
> nt/script/process/spinner  
> command finished

I have no idea

badly need help… my production date has been moved becoz of this

Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project.  
Education Through Collabration

On 2/1/06, Siva J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Education Through Collabration

–  
Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project.  
Education Through Collabration

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/9 "2006-02-14T16:38:09Z")

</div>

I am running ruby 1.8.2 (2005-04-11) [i386-linux] in dreamhost

I have no idea what I am missing

On 2/14/06, Jamis B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > executing "chmod 771 /home/sivajag/stage.varcasa.com/current/script/  
> > [out :: [stage.varcasa.com](http://stage.varcasa.com)] Couldn’t find any process matching: /  
> > I have no idea  
> > appear to do this.
> 
> - Jamis
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project.  
Education Through Collabration

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/10 "2006-02-14T17:43:54Z")

</div>

On Feb 14, 2006, at 8:35 AM, Siva J. wrote:

> I am running ruby 1.8.2 (2005-04-11) [i386-linux] in dreamhost
> 
> I have no idea what I am missing

Siva,

I’m not clear on what the problem is. The output of your script looks  
fine to me, but I’m not a Dreamhost user and so may not know what a  
correctly Dreamhost deployment ought to look like.

Any dreamhost users out there that care to comment?

- Jamis

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 4:31pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/11 "2006-02-14T16:31:33Z")

</div>

On Feb 13, 2006, at 9:41 PM, Siva J. wrote:

> processing command  
> [out :: [stage.varcasa.com](http://stage.varcasa.com)] Couldn’t find any process matching: /  
> home/sivajag/stage.varcasa.com/curre  
> nt/public/dispatch.fcgi  
> [out :: [stage.varcasa.com](http://stage.varcasa.com)] Couldn’t find any process matching: /  
> home/sivajag/stage.varcasa.com/curre  
> nt/script/process/spinner  
> command finished
> 
> I have no idea
> 
> badly need help… my production date has been moved becoz of this

Siva,

Please note that the 'Couldn’t find any process matching" is not an  
error–only an informational message indicating that you don’t have a  
spinner process running. What version of Rails are you using? Older  
versions of the reaper would basically tell the spinner process to  
“speed up” it’s polling during a deployment. Current versions do not  
appear to do this.

- Jamis

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/12 "2006-02-14T17:46:57Z")

</div>

On Feb 14, 2006, at 9:41 AM, Jamis B. wrote:

> On Feb 14, 2006, at 8:35 AM, Siva J. wrote:
> 
> > I am running ruby 1.8.2 (2005-04-11) [i386-linux] in dreamhost

Also, what version of Rails are you running? (Not Ruby, but the Rails  
framework itself.)

- Jamis

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 14, 2006, 8:10pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/13 "2006-02-14T20:10:01Z")

</div>

I am using Rails 1.0.0

Switchtower did checkout all my files from SVN and created needed  
directory  
struct in my remote system. It is failing to start dispatch.fcgi.

So I tried to run manually dispatch.fcgi, I am getting a internal 500  
error.  
I looked into logs nothin is avialable

On 2/14/06, Jamis B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - Jamis
> 
> > Any dreamhost users out there that care to comment?
> > 
> > > > processing command  
> > > > command finished  
> > > > nt/public/dispatch.fcgi
> > > 
> > > Rails mailing list  
> > > Education Through Collabration
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Rgds,  
–Siva J.  
[http://www.varcasa.com/](http://www.varcasa.com/)  
My First Rails Project.  
Education Through Collabration

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 19, 2006, 9:13am UTC](https://www.ruby-forum.com/t/switchtower-error/99658/14 "2006-02-19T09:13:40Z")

</div>

> During deployment a source code checkout (or export) is needed from the  
> deployment machine. This is not possible if our repository is accessible  
> only trough the local “file://”.

Hi,  
I am wondering how far one can go without using SwitchTower.I simply  
copy  
the files on to the server (naive I know ).SwitchTower seems to need a  
svn  
repository.I think most people have a local copy of the source which  
they  
want to deploy on a host.I dont see any reason why SwitchTower mandates  
a  
svn repository.Cant it just copy files from the local repository to the  
host?

Vivek

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 19, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/15 "2006-02-19T15:41:38Z")

</div>

On Feb 19, 2006, at 1:10 AM, Vivek K. wrote:

> copy of the source which they want to deploy on a host.I dont see  
> any reason why SwitchTower mandates a svn repository.Cant it just  
> copy files from the local repository to the host?

Sure it can, but you’ll need to write the tasks to do that yourself.

The reason for the use of svn is that is the way we do it at  
37signals. Not everyone will do it that way, but it has worked well  
for us.

If you write tasks for other deployment approaches, please do share  
them.

- Jamis

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 19, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/16 "2006-02-19T20:31:18Z")

</div>

On Feb 19, 2006, at 12:10 AM, Vivek K. wrote:

> I am wondering how far one can go without using SwitchTower.

I imagine you can go completely crazy. 🙂

> I simply copy the files on to the server (naive I  
> know ).SwitchTower seems to need a svn repository.I think most  
> people have a local copy of the source which they want to deploy on  
> a host.  
> I dont see any reason why SwitchTower mandates a svn  
> repository.Cant it just copy files from the local repository to the  
> host?

SwitchTower, out of the box, mandates a repository, and not just a  
Subversion repository but also supports CVS, Bazaar, Bazaar NG, and  
Perforce.

It does this because it’s “The Right Way to Do It”

When I first encountered version control, ala CVS in 1999 or so, I  
thought it was a big drag and extra overhead that would serve no  
purpose. I  
resisted its implementation for a month or so until the person who  
was advocating its use finally went ahead and sucked out code in and  
gave  
a demonstration of it’s use.

In five minutes’ time, I was absolutely smitten, and wished I had  
been using it since 1978. Where had CVS been my whole life? I now had  
the  
ability to know what I had done and where I was at, EVEN WHEN IT WAS  
JUST ME WRITING CODE. All of the other benefits of version control  
took a bit longer to sink it, but the ability to isolate changes  
(branch), remember release points (tag), work fluidly with co-workers  
without  
ever losing code, hack as aggressively as I wanted to without fear of  
losing what worked previously, and a complete freedom from ever worrying  
about making copies with names like file.old, file.date, file,bak,  
etc. is just something I’ll never work without again.

Take a few minutes to get your code into Subversion and you’ll be  
happy you did.

Programmers should NOT work without version control.

When Rails was pre 1.0, there was a lot of stress after each release  
with people not being sure how to gracefully upgrade their source trees  
to the new version. Those of us under version control had no such  
stress:

1. Commit all changes
2. Run upgrade
3. Run diff to see what changed
4. Pick and choose the changes we wanted

The benefits just go on and on…

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![Siva\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Siva\_J](https://www.ruby-forum.com/u/Siva_J)\
**Post date:** [February 19, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/switchtower-error/99658/17 "2006-02-19T23:36:12Z")

</div>

I agree, I have my servers in a colo and my svn repository behind the  
firewall in my  
office, so the colo can’t access the svn repository.

I am looking at doing a deploy method in switchtower that will copy the  
source tree from  
a local directory to the target servers, if you had svn locally it would  
do an svn  
export to a local temporary directory, then copy the results to the  
targets.

If I get this done I’ll give it to Jamis for consideration for inclusion  
in the next  
release.
