开发者

Capistrano Trouble From Git

开发者 https://www.devze.com 2022-12-19 10:55 出处:网络
I am new to using git and Capistrano. I have setup everything else on my server and pushed my app onto a git repo (http://github.com/tnederlof/daily-trailer). When I go to run cap deploy:coldeverythin

I am new to using git and Capistrano. I have setup everything else on my server and pushed my app onto a git repo (http://github.com/tnederlof/daily-trailer). When I go to run cap deploy:cold everything seems to be working until it tries to rake the db. Below is what I get when I run it, this is the last bunch of information I recieve and where the error occurs:

  * executing "cd /var/www/开发者_如何学Godailytrailer.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

Can someone please help me figure out what script/spin is all about?

Thank you!


Do you know what you're trying to use for an app server? If it's Passenger, then you've got something screwed up in your deploy.rb. (Post that file if you want more help debugging this.) If it's mongrel, then this should be helpful.

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


so I am having the sam problem here Everything gets executed 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

here is my deploy file don't see any problems as is

set :application, "domain"
set :repository,  "git@git.assembla.com: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 found the ans was using passenger and needed this in the deploy.rb

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

精彩评论

暂无评论...
验证码 换一张
取 消