Hi, Has anyone experiences using SwitchTower (Windows) in a shared hosting environment (Textdrive)? I already patched the SwitchTower rake tasks (I don''t know if someone is interested on it), but i still experience some problems (not in the sudoers list, ...). Thank you for answer (and thank you to the textdrive guys, i never had a such fast support!) -- Jean-Etienne Durand Mail: etienne dot durand at mail dot com
Jean-Etienne Durand wrote:> Has anyone experiences using SwitchTower (Windows) in a shared hosting > environment (Textdrive)? I already patched the SwitchTower rake tasks (I > don''t know if someone is interested on it), but i still experience some > problems (not in the sudoers list, ...).Jean, With the way SwicthTower and production server(s) interact, it really does not matter if your in a share enviroment or not. Then again it might depend on your custom tasks. Try running switctower directly from the commandline, and check what errors does throw if any. Try to require net/ssh from an irb prompt and see if it fails. Apply patch http://dev.rubyonrails.com/ticket/2627(Swichtower fails from a windows box), or others if applicable. Hope this clears things out, Zsombor -- Company - http://primalgrasp.com Thoughts - http://deezsombor.blogspot.com
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
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
I corrected the standard.rb script, I just change run "#{current_path}..." to run "ruby #{current_path}". But since I didn''t no access yet to the site, i don''t have any process. I got the following error: Couldn''t find any process matching: /users/home/xxx/web/public/current/public/dispatch.fcgi command finished
On Nov 7, 2005, at 3:05 PM, Jean-Etienne Durand wrote:> I corrected the standard.rb script, I just change run "# > {current_path}..." to run "ruby #{current_path}". > > But since I didn''t no access yet to the site, i don''t have any > process. > I got the following error: > Couldn''t find any process matching: /users/home/xxx/web/public/ > current/public/dispatch.fcgi > command finishedAre you using lighttpd or apache? You''ll need to configure one or the other to know where your fcgi script is, and then restart the server. This will cause at least one dispatch.fcgi to start. The first deployment of your app is an edge case--it requires a bunch of extra work to get your server configured and so forth. ST is really only useful once you''ve got that all taken care of. Subsequent deployments go quite smoothly. - Jamis