2010-02-05 72 views
2

我是新來使用git和Capistrano。我已經在我的服務器上設置了其他所有內容,並將我的應用程序推送到git倉庫(http://github.com/tnederlof/daily-trailer)。當我運行cap deploy時:冷卻一切似乎都在工作,直到它試圖耙分貝。下面是我所得到的,當我運行它,這是我收到併發生錯誤信息的最後一堆:Capistrano麻煩從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 

可有人請幫我找出腳本/旋轉是怎麼一回事?

謝謝!

回答

2

你知道你想要用於應用服務器嗎?如果它是Passenger,那麼你的deploy.rb中有一些東西搞砸了。 (如果你想更多的幫助調試這個文件,請發佈該文件。)如果它是雜種,那麼這應該是有幫助的。

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

+0

你說得對,我再次檢查了部署文件,發現有問題。謝謝您的幫助! – 2010-02-05 05:46:25

+0

不客氣。起初,Capistrano是一小撮人。 – jdl 2010-02-08 20:22:53

+0

爲什麼不告訴人們什麼是錯的?這就是爲什麼我們來到這裏,看看其他人如何解決我們遇到的同樣的問題:) – 2011-08-31 22:23:08

2

所以我有這裏的SAM問題 一切變得期待

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 

這裏是我的部署文件看不出有什麼問題,是

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" 

執行編輯: 從不介意ans 正在使用乘客,並需要在deploy.rb中

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