I'm trying to learn how to use Capistrano. I'm having trouble getting
the deploy:cold task to work. When I run it, I get this output:
[EMAIL PROTECTED]:~/project/journal_app$ cap deploy:cold
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
ssh: myhost.com:46678: Name or service not known
svn: Connection closed unexpectedly
*** [deploy:update_code] rolling back
* executing "rm -rf /home/username/www/myhost.com/journal_app/
releases/20070918030352; true"
servers: ["myhost.com"]
[myhost.com] executing command
command finished
/usr/local/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:FalseClass (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/recipes/deploy/scm/base.rb:35:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/recipes/deploy/scm/base.rb:63:in `local'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/recipes/deploy.rb:37:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/configuration/variables.rb:87:in `call'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/configuration/variables.rb:87:in `fetch'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/configuration/variables.rb:110:in `protect'
... 35 levels...
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
capistrano/cli/execute.rb:14:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/bin/
cap:4
from /usr/local/bin/cap:16:in `load'
from /usr/local/bin/cap:16
Here is my deploy.rb file:
set :user, 'username'
ssh_options[:port] = '46678'
set :svn, '/usr/bin/svn'
set :application, "journal_app"
set :repository, "svn+ssh://[EMAIL PROTECTED]:46678/home/username/
svn-repos/journal_app/trunk"
#set :repository, "file:///home/username/svn-repos/journal_app/trunk"
# 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, "/home/username/www/myhost.com/journal_app"
set :mongrel_port, "3000" # Mongrel port
set :mongrel_nodes, "3" # Number of Mongrel instances
for those with multiple Mongrels
#
# # If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion
role :app, "myhost.com"
role :web, "myhost.com"
role :db, "myhost.com", :primary => true
One thing that I'm not understanding is the proper configuration of
the "repository" variable. My subversion server and repository are the
same machine that's hosting the production application. Does that mean
"repository" should be...
set :repository, "file:///home/user/svn-repos/projectname/trunk"
I tried that but got an error.
Any help would be greatly appreciated.
Thanks,
E
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---