【发布时间】:2013-06-10 12:42:31
【问题描述】:
我的工作部署脚本因upload via sftp failed on XX.XXX.XXX.XXX: Net::SFTP::StatusException (Net::SFTP::StatusException write /tmp/20130610114941.tar.gz (4, "failure")) 错误而失败。
这是我的部署脚本
require "rvm/capistrano"
require "bundler/capistrano"
set :rvm_type, :user
set :rvm_ruby_string, 'ruby-2.0.0-p0'
set :user, "deployer"
set :application, "myapp"
set :deploy_to, "/home/#{user}/apps/#{application}"
set :bundle_dir, "/home/#{user}/.rvm/gems/ruby-2.0.0-p0"
server "XX.XXX.XXX.XXX", :web, :app, :db, primary: true
set :use_sudo, false
set :deploy_via, :copy
set :repository, "."
set :copy_exclude, %w[.git log tmp .DS_Store]
set :scm, :none
default_run_options[:pty] = true
after "deploy", "deploy:cleanup" # keep only the last 5 releases
namespace :deploy do
task :start do
;
end
task :stop do
;
end
task :restart, roles: :app, except: {no_release: true} do
run "touch #{deploy_to}/current/tmp/restart.txt"
end
end
有什么想法吗?
谢谢
编辑:刚刚检查,我的磁盘空间已满。显然这是我的问题。一个更新后挂钩来防止这种情况?
【问题讨论】:
-
您是否检查了服务器上的可用磁盘空间? df /tmp
-
非常感谢您的快速回答。刚刚检查了我的磁盘空间及其 %99.7 已满 :) 显然这是我的问题。如何预防?
-
这个问题涵盖了为 capistrano 移动复制目录 - 如果您有另一个有足够空间的分区。 stackoverflow.com/questions/3724534/…
标签: ruby-on-rails ruby deployment sftp rvm-capistrano