Re: Re: Switchtower deployment

Jamis Buck
Mon, 07 Nov 2005 21:43:04 -0000

Running in a shared environment, where you aren''t a sudoer,
you''ll
probably need to create your own version of some of the standard
switchtower tasks (the ones that use sudo). Fortunately, there is
only one of them right now, :restart. The following definition in
your deploy.rb ought to do the trick:

   desc "Restart the FCGI processes on the app server."
   task :restart, :roles => :app do
     # use ''run'' instead of ''sudo''
     run "#{current_path}/script/process/reaper"
   end

- Jamis

On Nov 7, 2005, at 1:20 PM, Jean-Etienne Durand wrote:

> Hi,
>
> Thank you for your reply. You can find the error below.
> I checked your ticket, and this error appears if you don''t start
> pageant (which seems to be normal). I go further in the command,
> the error occurs when running the reaper task.
>
> Here is the error:
>
> c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/
> switchtower/command.rb:41:in `process!'': command "sudo
/users/h
> ome/xxxx/web/public/current/script/process/reaper" failed on xxx
> (RuntimeError)
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/actor.rb:145:in `run''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/actor.rb:179:in `sudo''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/recipes/standard.rb:96:in `instance_eval''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/recipes/standard.rb:95:in `instance_eval''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/actor.rb:110:in `instance_eval''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/actor.rb:110:in `restart''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/actor.rb:105:in `restart''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/recipes/standard.rb:135:in `instance_eval''
>          ... 9 levels...
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> lib/switchtower/cli.rb:7:in `execute!''
>         from c:/opt/ruby/lib/ruby/gems/1.8/gems/switchtower-0.9.0/
> bin/switchtower:11
>         from c:/opt/ruby/bin/switchtower:18:in `load''
>         from c:/opt/ruby/bin/switchtower:18
> --
>   Jean-Etienne Durand
>   Mail: etienne dot durand at mail dot com
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails