Capistrano部署失败,部署:assets:backup_manifest

时间:2014-01-02 08:02:28

标签: ruby-on-rails capistrano capistrano3

我在尝试使用Capistrano进行部署后,第一次遇到一系列错误,我发现这个我不明白。

此任务deploy:assets:backup_manifest上的部署失败,这是失败后的结果;

 INFO [e8ec3f64] Running /usr/bin/env cp /var/www/html/webapp/releases/20140102105308/public/assets/manifest*.json /var/www/html/webapp/releases/20140102105308/assets_manifest_backup.json on 208.68.39.56
DEBUG [e8ec3f64] Command: cd /var/www/html/webapp/releases/20140102105308 && /usr/bin/env cp /var/www/html/webapp/releases/20140102105308/public/assets/manifest*.json /var/www/html/webapp/releases/20140102105308/assets_manifest_backup.json
cap aborted!
cp stdout: Nothing written
cp stderr: Nothing written

知道如何解决这个问题。 非常感谢..

Capfile在这里;

# Load DSL and Setup Up Stages
require 'capistrano/setup'

# Includes default deployment tasks
require 'capistrano/deploy'

# Includes tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
#   https://github.com/capistrano/rvm
#   https://github.com/capistrano/rbenv
#   https://github.com/capistrano/chruby
#   https://github.com/capistrano/bundler
#   https://github.com/capistrano/rails/tree/master/assets
#   https://github.com/capistrano/rails/tree/master/migrations
#
# require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
# require 'capistrano/rails'
 require 'capistrano/bundler'
 require 'capistrano/rails/assets'
 require 'capistrano/rails/migrations'

# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }

和部署文件在这里;

#SSHKit.config.command_map[:rake] = "bundle exec rake"
set :application, 'webapp'
set :repo_url, 'git@bitbucket.org:xxxxxxxxxxxxxxxxxxxxx.git'
set :branch, 'new_look'

# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

 set :deploy_to, '/var/www/html/webapp'
 set :scm, :git

 set :format, :pretty
 set :log_level, :debug
 set :pty, true

 set :linked_files, %w{config/database.yml}
 set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# set :default_env, { path: "/opt/ruby/bin:$PATH" }
 set :keep_releases, 5

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # Your restart mechanism here, for example:
       execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
       within release_path do
         execute :rake, 'cache:clear'
       end
    end
  end

  after :finishing, 'deploy:cleanup'

end

只是添加; 除manifest.yml之外,manifest.json不会退出任何地方。谢谢

0 个答案:

没有答案