Welcome Guest | Login

Problem with Capistrano!

Hi,

I am new to Capistrano. I followed the steps mentioned here for deployment using Capistrano 1.4.1 - http://www.hostingrails.com/forums/wiki_thread/5

When I run a 'cap cold_deploy' this is the error I get:

C:\InstantRails\rails_apps\nurall>cap cold_deploy
 * executing task cold_deploy
 * executing task update
** transaction: start
 * executing task update_code
 * querying latest revision...
*** [update_code] transaction: rollback
 * [update_code] rolling back
 * executing "rm -rf /home/nurallc/nurall/releases/20070914060913"
   servers: ["nurall.com"]
Password: ******

   [nurall.com] executing command
   command finished
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/
subversion.rb:87:in ``': No such file or directory - svn log --no-auth-cache   -
q --limit 1 http://svn.nurall.com/svn/nurall/trunk (Errno::ENOENT)
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/scm/subversion.rb:87:in `svn_log'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/scm/subversion.rb:23:in `latest_revision'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/configuration.rb:62:in `initialize'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/configuration.rb:89:in `call'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/configuration.rb:89:in `[]'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/configuration.rb:236:in `method_missing'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/scm/subversion.rb:63:in `checkout'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/recipes/standard.rb:80:in `load'
        ... 15 levels...
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/ca
pistrano/cli.rb:12:in `execute!'
       from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/ca
p:11
       from C:/InstantRails/ruby/bin/cap:16:in `load'
       from C:/InstantRails/ruby/bin/cap:16

Is this a gems version issue? If not what could the problem be?

Any kind of help would be really appreciated!!

Thanks,
Karthik

2007-09-14 01:59 AM

Hi Karthik,

This might work for you. SSH into your account and checkout your code from the svn repository. This will set the cache for your repository, which can help simplify the deployment process, and in your case will likely get rid of the error.

2007-09-14 02:04 AM

Hi Willc,

Thanks for your prompt reply!

I actually went past that error my installing a command-line svn client. But now, my 'cap cold_deploy' is hanging like this:

C:\InstantRails\rails_apps\nurall>cap cold_deploy
 * executing task cold_deploy
 * executing task update
** transaction: start
 * executing task update_code
 * querying latest revision...
 * executing "if [[ ! -d /home/nurallc/nurall/releases/20070914074756 ]]; then\
n              svn co --no-auth-cache   -q -r5 http://svn.nurall.com/svn/nurall/
trunk /home/nurallc/nurall/releases/20070914074756 &&\n              (test -e /h
ome/nurallc/nurall/revisions.log || (touch /home/nurallc/nurall/revisions.log &&
chmod 666 /home/nurallc/nurall/revisions.log)) && echo `date +\"%Y-%m-%d %H:%M:
%S\"` $USER 5 20070914074756 >> /home/nurallc/nurall/revisions.log;\n
fi"
   servers: ["nurall.com"]
Password: ******

   [nurall.com] executing command
** [out :: nurall.com] Authentication realm: < http://svn.nurall.com:80> Enter L
ogin Info
** [out :: nurall.com] Password for 'nurallc':
** [out :: nurall.com] subversion is asking for a password
** [out :: nurall.com] Authentication realm: < http://svn.nurall.com:80> Enter L
ogin Info
** [out :: nurall.com] Username:

Any idea why this might be happening?

Thanks,
Karthik

2007-09-14 03:03 AM

Karthik -

Are you using logins mentioned inside your svn-accessconf file ?
Also - Try putting in the lines given below into your deploy.rb or have you added them already ?

Use whatever SVN User/Password you want :
set :svn_user, ENV['svn_user'] || "jonathan"
          set :svn_password, Proc.new { Capistrano::CLI.password_prompt('SVN Password: ') }
          set :repository,
           Proc.new { "--username #{svn_user} " +
                      "--password #{svn_password} " +
                      "http://your.domain.tld/path/to/svn/#{application}/trunk/" }

So you can now do things like :

svn_user=your_name cap deploy



2007-09-14 04:13 AM

Thanks, Varun!

I think that worked for me!!

Appreciate the help!

Karthik

2007-09-14 04:35 AM


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