2012-06-19 3 views
0

I가 다음과 같은 출력되는 카피 스트라 노 배포 스크립트를카피 스트라 노 배포 문제 '배포는/자산'

* executing `deploy:assets:precompile' 
    * executing "cd /data/sites/app/releases/20120619023328 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile" 
    servers: ["123.230.158.135"] 
    [123.230.158.135] executing command 
*** [err :: 123.230.158.135] mkdir -p /data/sites/app/releases/20120619023328/public/assets 
*** [err :: 173.230.158.135] mkdir -p /data/sites/app/releases/20120619023328/public/assets 
*** [err :: 173.230.158.135] mkdir -p /data/sites/app/releases/20120619023328/public/assets 
*** [err :: 173.230.158.135] mkdir -p /data/sites/app/releases/20120619023328/public/assets 

이이에 격리 : 로드 '배포/자산'

하지만 난을 디렉토리가 존재할 때 여기서 무슨 일이 일어나고 있는지 정확히 알 수 없습니다. '배포/자산'로드를 주석 처리하면 오류가 사라집니다. 이 호출의 위치를 ​​옮겼지만 효과가없는 것 같습니다. 또한 모든 것이 제대로 배포되지만 분명히이 오류가 발생하지 않는 것처럼 보입니다. 시정하는 방법에 대한 아이디어가 있습니까? 또는 'deploy/assets'로드 코드가있는 위치는 어디입니까?

들으

편집 한 은 이것이 무슨 일이 일어나고있는 것을 가능합니까? Capistrano error with successfully copied files

와 난 그냥 무시하고 오히려 표준 출력보다 stderror에이 글을 쓰는해야

답변

1

이 여기

cap production deploy:cold 

는 그것을위한 스크립트입니다 사용해보십시오 :

set :stages, %w(production staging)  #various environments 
    load "deploy/assets"     #precompile all the css, js and images... before deployment.. 
    require "bundler/capistrano"   # install all the new missing plugins... 
    require 'capistrano/ext/multistage'  # deploy on all the servers.. 
    require 'delayed/recipes'    # load this for delayed job.. 
    require "rvm/capistrano"    # if you are using rvm on your server.. 
    require './config/boot'   
    require 'airbrake/capistrano'   # using airbrake in your application for crash notifications.. 
    require 'thinking_sphinx/deploy/capistrano' # using thnking sphinx in your application 
    require 'whenever/capistrano'   # using whenever for cron jobs.. 

    before "deploy:update_code", "thinking_sphinx:stop" # stop the serch engine before updating the code.. 
    after "deploy:update_code", "thinking_sphinx:rebuild" #rebuild the search engine configure and start the search engine.. 

    set :delayed_job_args, "-n 2"   # number of delayed job workers 
    before "deploy:update_code", "delayed_job:stop" # stop the previous deployed job workers... 
    after "deploy:start", "delayed_job:start" #start the delayed job 
    after "deploy:restart", "delayed_job:restart" # restart it.. 

    after "deploy:update", "deploy:cleanup" #clean up temp files etc. 

    set :rvm_ruby_string, '1.9.3'    # ruby version you are using... 
    set :rvm_type, :user 
    set :whenever_environment, defer { stage } # whenever gem for cron jobs... 

    server "xx.xx.xx.xx", :app, :web, :db, :primary => true #ip of the server 

    set(:application) { "my_cool_project" } 
    set (:deploy_to) { "/home/me/#{application}/#{stage}" } 
    set :user, 'my_awesome_deployer' 
    set :keep_releases, 3 
    set :repository, "git_repo_url" 
    set :use_sudo, false 
    set :scm, :git 
    default_run_options[:pty] = true 
    ssh_options[:forward_agent] = false 
    set :deploy_via, :remote_cache 
    set :git_shallow_clone, 1 
    set :git_enable_submodules, 1 

    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 
관련 문제