Andreas Lyngstad
Andreas Lyngstad

Reputation: 4927

capistrano and git problem

Hello I get this error when I do cap deploy:cold.

 * executing "cd /var/www/myapp.no/releases/20100905130830; rake RAILS_ENV=
production  db:migrate"
    servers: ["myapp.no"]
    [gcrdesign.no] executing command
 ** [out :: gcrdesign.no] (in /var/www/myapp.no/releases/20100905130830)
    command finished
  * executing `deploy:start'
[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.g
d/2BPeA
  * executing "cd /var/www/myapp.no/current &&  nohup script/spin"
    servers: ["gcrdesign.no"]
    [gcrdesign.no] executing command
*** [err :: gcrdesign.no] nohup: cannot run command `script/spin': No such file
or directory
    command finished
failed: "sh -c 'cd /var/www/gcrdesign.no/current &&  nohup script/spin'" on gcrd
esign.no

I have another page on this server an when I go to the one I try to deploy it uses the other pages database. Really strange. They are the same cms application, but different sites. Does anybody know what I am doing wrong

Here is my deploy.rb

set :application, "myapp.no"
role :app, application
role :web, application
role :db,  application, :primary => true

set :user, "myname"
set :use_sudo, false
set :deploy_to, "/var/www/#{application}"
set :deploy_via, :remote_cache

set :scm, :git
set :repository, "git://github.com/myname/myapp.git"
set :branch, "master"


namespace :deploy do
  desc "Symlink shared configs and folders on each release."
  task :symlink_shared do
    run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"  
    run "ln -nfs #{shared_path}/public/assets/pictures #{release_path}/public/assets/pictures"  
    run "ln -nfs #{shared_path}/db/productin.sqlite3#{release_path}/db/productin.sqlite3"  
    run "ln -nfs #{shared_path}/public/uploads/Image #{release_path}/public/uploads/Image"  
  end

  desc "Restarting mod_rails with restart.txt"
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end



end
after 'deploy:update_code', 'deploy:symlink_shared'
after "deploy", "deploy:cleanup"

Upvotes: 0

Views: 358

Answers (1)

Dave Pirotte
Dave Pirotte

Reputation: 3816

It looks like you are using passenger/mod_rails from your deploy.rb. When using passenger, you need to override the default deploy:start and deploy:stop tasks.

namespace :deploy do
  [:start, :stop].each do |t|
    desc "ignore #{t} since we are using passenger"
    task t do ; end
  end
end

Upvotes: 2

Related Questions