Welcome Guest | Login

Capistrano problems from WinXP

Hi there,

I'm trying to use Capistrano 2.0 to upload my first rails app. Following the instructions at http://www.hostingrails.com/forums/wiki_thread/46, everything seems fine until I get to cap deploy:cold
Here is what I get:
C:\InstantRails\rails_apps\FreeBooks>cap deploy:cold
 * executing `deploy:cold'
 * executing `deploy:update'
** transaction: start
 * executing `deploy:update_code'
*** [deploy:update_code] rolling back
 * executing "rm -rf /home/user/FreeBooks/releases/20070821125545; true"
   servers: ["free-computer-programming-books.com"]
Password:
   [free-computer-programming-books.com] executing command
   command finished
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy.rb:37:in
``': No such file or directory - svn info http://svn.free-computer-programming-books.com/svn/FreeBo
ks/trunk/  -rHEAD (Errno::ENOENT)
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy.rb:37:in `load'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy.rb:82:in `with_env'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy.rb:37:in `load'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy/scm/subversion.rb:55:in `query_revision'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy/scm/base.rb:35:in `send'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy/scm/base.rb:35:in `method_missing'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy/scm/base.rb:63:in `local'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/de
loy/scm/base.rb:35:in `method_missing'
        ... 39 levels...
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/cli/execut
.rb:14:in `execute'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/bin/cap:4
       from C:/InstantRails/ruby/bin/cap:16:in `load'
       from C:/InstantRails/ruby/bin/cap:16

I did have a seperate username and password for svn as opposed to my shh account, but I have since added an account to svn with the same details.

I can access svn via http in a browser and also via tortoiseSVN from XP.

Here is my deploy.rb:

set :application, "FreeBooks"
set :domain, "free-computer-programming-books.com"
set :user, "user"
set :repository,  "http://svn.free-computer-programming-books.com/svn/FreeBooks/trunk/"
set :use_sudo, false
set :deploy_to, "/home/user/#{application}"
set :deploy_via, :checkout
set :chmod755, "app config db lib public vendor script script/* public/disp*"

set :svn_username, "****"
set :svn_password, "#########"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion

role :app, domain
role :web, domain
role :db,  domain, :primary => true


Capfile:

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'config/deploy'

# ========================
#     For FCGI Apps
# ========================

namespace :deploy do

 task :start, :roles => :app do
   run "rm -rf /home/#{user}/public_html;ln -s #{current_path}/public /home/#{user}/public_html"
 end

 task :restart, :roles => :app do
   run "#{current_path}/script/process/reaper --dispatcher=dispatch.fcgi"
   run "cd #{current_path} && chmod 755 #{chmod755}"
 end

end


Many thanks in advance,

2007-08-22 02:36 AM

Dave Simpson
Engine House Solutions
Daveehs - could you check this again now ?
I've replied to your support request now.

2007-08-22 03:53 AM

Hi Varun,

Still not working (Capistrano or site), still no word from your colleague either...

Cheers,

Dave.

2007-08-22 07:48 AM

Dave Simpson
Engine House Solutions
Dave,

I sent you a reply.  For anyone else who is having the problem.  On windows XP you must install the SVN binaries and make sure that they are in your PATH.  Simply having Tortoise installed will not work.  Capistrano uses svn on the local machine to find out what the latest repository revision is.

2007-08-22 09:37 AM

Hi,

just encountered the same problem, svn is in the path (svn --version gives 1.4.5).
deploy:check --> You appear to have all necessary dependencies installed
deploy:cold --> C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy/scm/subversion.rb:56:in `query_revision': undefined method `[]' for false:FalseCla
ss (NoMethodError)
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `send'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy/scm/base.rb:63:in `local'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/recipes/deploy.rb:37:in `load'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/configuration/variables.rb:87:in `call'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/configuration/variables.rb:87:in `fetch'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/configuration/variables.rb:110:in `protect'
        ... 35 levels...
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/cli/execute.rb:14:in `execute'
       from C:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.0.0/bin/cap:4
       from C:/ruby/bin/cap:16:in `load'
       from C:/ruby/bin/cap:16

any ideas?

cheers,
Artur

2007-08-29 07:45 AM

okay, my problem is svn tunneling...
found some solutions but nothing helps.
the closest is modifying of svn config file and putting line ssh=plink, the the error does not come but cap deploy works forever...

funny is that for netbeans I did not have any problems with configuration, it works fine.

cheers,
Artur

2007-08-29 08:32 AM

yes! it works now.
I was playing with ssh=plink and finally found the right combination (had to put \\ instead \ in the path to the private key file)

cheers,
Artur

2007-08-29 08:43 AM

glad to know it is fixed

I also tried to investigate your problem

I suspected either capistrano 2.0 or svn 1.4.5, as both were new versions

updated to those version and checked
did not face any errors
http://weblog.jamisbuck.org/2007/7/22/capistrano-2-0/
jamis does mention some random crashes and he attributes them to netssh library
http://brunomiranda.com/past/2007/7/20/capistrano_2_local_deployment_path/
provided a fix which was specific to path issues, which is not your case

you gave me a reason to look into Capistrano internals

cheers

Jackson

2007-08-29 08:53 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.