Capistrano on windows (again)

Hi all

I didn’t get a response to my first post so I thought I’d try again. is
anyone successfully using capistrano to deploy their app from a windows
box?

I’m trying to deploy a test app to my dreamhost account but all i get is
“rake aborted!” with no further information. Can someone please confirm
if
capistrano even works under windows?

many thanks
al

here’s the output from the command line:

C:\rails\captest>rake remote:exec ACTION=setup --trace
(in C:/rails/captest)

** Invoke remote:exec (first_time)
** Execute remote:exec
loading configuration
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/recipes/standard.rb
loading configuration ./config/deploy.rb

  • executing task setup
  • executing “mkdir -p -m 775
    /home/tcarlson/captest.mydomain.com/releases
    /home/tcarlson/captest.mydomain.com/
    shared/system &&\n mkdir -p -m 777
    /home/tcarlson/captest.mydomain.com/shared/log”
    servers: [“captest.mydomain.com”, “mysql.mydomain.com”]
    Password: ********

rake aborted!
tcarlson
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh/session.rb:129:in
initialize' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh.rb:47:in new’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.9/lib/net/ssh.rb:47:in
start' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/ssh.rb:31:in connect’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:25:in
connect_to' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:397:in establish_connections’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:396:in
each' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:396:in establish_connections’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:424:in
execute_on_servers' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:173:in run’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/recipes/standard.rb:39:in
instance_eval' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/recipes/standard.rb:38:in instance_eval’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:125:in
instance_eval' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:125:in setup’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/actor.rb:120:in
setup' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/cli.rb:246:in send’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/cli.rb:246:in
execute_recipes!' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/cli.rb:246:in each’
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/cli.rb:246:in
execute_recipes!' c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.1.0/lib/capistrano/cli.rb:221:in execute!’
./lib/tasks/capistrano.rake:15:in cap' ./lib/tasks/capistrano.rake:82 ./lib/tasks/capistrano.rake:74:in call’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in each’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in invoke’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in
synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in each’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 c:/ruby/bin/rake:18:in load’
c:/ruby/bin/rake:18

C:\rails\captest>

Here’s a link to someone who deploys to dreamhost from windows.
http://casperfabricius.com/blog/2006/05/21/rails-on-dreamhost/

The main issues are that 1) you need to make dispatch.fcgi and the
script/*.rb files executable after they are symlinked. You can do this
either by an after symlink task
like in the above link or you can change them in the repository by
making
setting their executable property

$ svn propset svn:executable ON somescript ==> property
‘svn:executable’
set on ‘somescript’

Another problem that you have to probable fix is the shebang line (the
first
line of executable files
is probably set like so #! c:/ruby/bin/ruby.exe

this needs to point to the correct ruby path of the dreamhost server for
dispatch.fcgi

Dominic

“Dominic S.” [email protected] wrote
in message
news:[email protected]

Here’s a link to someone who deploys to dreamhost from windows.
http://casperfabricius.com/blog/2006/05/21/rails-on-dreamhost/

Hi dominic

thanks for all your suggestions, but I’m having trouble even deploying
the
app let alone testing that it runs properly. according to the server
logs,
the capistrano task isn’t even logging in to the server so I’m guessing
there’s a problem with deploy.rb somewhere

thanks again
al

“Alan B.” [email protected] writes:

Hi all

I didn’t get a response to my first post so I thought I’d try again. is
anyone successfully using capistrano to deploy their app from a windows box?

I’m trying to deploy a test app to my dreamhost account but all i get is
“rake aborted!” with no further information. Can someone please confirm if
capistrano even works under windows?

I use capistrano to deploy on dreamhost from windows XP on a shared
host.

I think you need to properly setup your deploy.rb file.

So, if your domain name is say ‘kreeti.com’.

Then make sure that

role :web, “www.kreeti.com
role :app, “www.kreeti.com
role :db, “www.kreeti.com”, :primary => true

** Execute remote:exec

Is the password correct? On your web host find out whether, the
directory
/home/tcarlson/captest.mydomain.com/shared/log is created?

Try the above and see if you make any progress else report back.

Cheers.


Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| “All animals are equal, but some animals are more equal than others.”
| – Orwell, Animal Farm, 1945
`----