我无法让 capistrano 将我的 rails 应用程序完全部署到我的 dreamhost VPS ..
据我所知,它在创建发布目录时停止了..
$ cap deploy
我明白了
failed: "sh -c 'cd /home/gasloggr/gasloggr.com/releases/20120824064241 && bundle install --gemfile /home/gasloggr/gasloggr.com/releases/20120824064241/Gemfile --path /home/gasloggr/gasloggr.com/shared/bundle --deployment --quiet --without development test'" on gasloggr.com
出于故障排除的目的,我在服务器本身上运行了引号中的内容,我收到了..
bash: cd: /home/gasloggr/gasloggr.com/releases/20120824064241: No such file or directory
快速ls -alh
发布目录,猜猜是什么......它是空的。
我的 deploy.rb 文件
require 'bundler/capistrano'
default_run_options[:pty] = false
ssh_options[:forward_agent] = true
set :use_sudo, false
set :user, "gasloggr"
set :application, "gasloggr.com"
set :repository, "git@github.com:gorelative/GasLoggr.git"
set :scm, :git
set :branch, 'master'
set :git_shallow_clone, 1
set :deploy_via, :copy
set :copy_compression, :bz2
set :rails_env, 'production'
set :deploy_to, "/home/gasloggr/#{application}"
role :web, "#{application}" # Your HTTP server, Apache/etc
role :app, "#{application}" # This may be the same as your `Web` server
role :db, "#{application}", :primary => true # This is where Rails migrations will run
# role :db, "your slave db-server here"
namespace :deploy do
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
end
namespace :deploy do
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
end
我已经尝试删除:deploy_via
以及以下所有内容:
set :deploy_via, :remote_cache
set :deploy_via, :copy