2010-02-05 5 views
2

Je suis nouveau à l'aide de git et Capistrano. J'ai installé tout le reste sur mon serveur et ai poussé mon application sur un repo git (http://github.com/tnederlof/daily-trailer). Quand je vais courir déployer le bouchon: froid tout semble fonctionner jusqu'à ce qu'il essaie de ratisser le db. Voici ce que je reçois quand je le lance, c'est le dernier groupe d'informations que je reçois et où l'erreur se produit:Capistrano Trouble De Git

* executing "cd /var/www/dailytrailer.net/releases/20100205052047; rake RAILS_ENV=production db:migrate" 
    servers: ["173.203.201.168"] 
    [173.203.201.168] executing command 
** [out :: 173.203.201.168] (in /var/www/dailytrailer.net/releases/20100205052047) 
    command finished 
    * executing `deploy:start' 
[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA 
    * executing "cd /var/www/dailytrailer.net/current && nohup script/spin" 
    servers: ["173.203.201.168"] 
    [173.203.201.168] executing command 
** [out :: 173.203.201.168] nohup: ignoring input and appending output to `nohup.out' 
** [out :: 173.203.201.168] nohup: cannot run command `script/spin': No such file or directory 
    command finished 
failed: "sh -c 'cd /var/www/dailytrailer.net/current && nohup script/spin'" on 173.203.201.168 

Quelqu'un peut-il me s'il vous plaît aider à comprendre ce script/spin est tout au sujet?

Merci!

Répondre

2

Savez-vous ce que vous essayez d'utiliser pour un serveur d'applications? Si c'est Passenger, alors vous avez quelque chose de foutu dans votre deploy.rb. (Publiez ce fichier si vous voulez plus d'aide pour le déboguer.) Si c'est du métis, alors cela devrait être utile.

http://www.rubyrobot.org/article/deploying-rails-20-to-mongrel-with-capistrano-21

+0

Vous aviez raison, j'ai vérifié à nouveau dans le fichier de déploiement, quelque chose n'allait pas. Merci pour l'aide! –

+0

De rien. Capistrano est une poignée au début. – jdl

+0

pourquoi ne pas dire aux gens ce qui n'allait pas? C'est pourquoi nous venons ici, pour voir comment les autres fixent les mêmes problèmes que nous avons :) –

2

si je rencontre le problème sam ici Tout est exécuté Expect for

executing `deploy:start' 
[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA 
    * executing "cd /srv/www/domain.com/domain/current && nohup script/spin" 
    servers: ["domain.com"] 
    [domain.com] executing command 
** [out :: domain.com] nohup: ignoring input and appending output to `nohup.out' 
** [out :: domain.com] nohup: cannot run command `script/spin': No such file or directory 
    command finished 
failed: "sh -c 'cd /srv/www/domain.com/domain/current && nohup script/spin'" on domain.com 

ici est mon fichier deploy ne voient pas de problème comme cela est

set :application, "domain" 
set :repository, "[email protected]:domain.git" 
set :user, "blitz" 
set :use_sudo, false 


set :scm, :git 
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` 
set :deploy_to, "/srv/www/domain.com/#{application}" 
#set :git_enable_submodules, 1   # Make sure git submodules are populated 
set :port, 3002      # The port you've setup in the SSH setup section 
#set :ssh_options, { :forward_agent => true } 
default_run_options[:pty] = true 


role :web, "domain.com"       # Your HTTP server, Apache/etc 
role :app, "domain.com"       # This may be the same as your `Web` server 
role :db, "domain.com", :primary => true # This is where Rails migrations will run 
#role :db, "domain.com"       # for slave db 

# If you are using Passenger mod_rails uncomment this: 
# if you're still using the script/reapear helper you will need 
# these http://github.com/rails/irs_process_scripts 

namespace :deploy do 
    desc "Restarting mod_rails with restart.txt" 
# task :start do ; end 
# task :stop do ; end 
    task :restart, :roles => :app, :except => { :no_release => true } do 
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" 
    end 

    desc "Make symlink for database.yml" 
    task :symlink_dbyaml do 
    run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" 
    end 

    desc "Create empty database.yml in shared path" 
    task :create_dbyaml do 
    run "mkdir -p #{shared_path}/config" 
    put '', "#{shared_path}/config/database.yml" 
    end 
end 


after 'deploy:setup', 'deploy:create_dbyaml' 
after 'deploy:update_code', 'deploy:symlink_dbyaml' 

after "deploy", "deploy:cleanup" 

edit: never-mind trouvé les ans utilisait le passager et avait besoin de cela dans le deploy.rb

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