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 SimpsonEngine House Solutions