我无法让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
发布dir的快速ls -alh
,猜猜它是空的。
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
答案 0 :(得分:2)
请按照此处列出的方法再试一次:http://wiki.dreamhost.com/Capistrano
这个特定部分可能是最有帮助的,提到上限部署:设置:http://wiki.dreamhost.com/Capistrano#Deployment_with_Capistrano