尝试使用Capistrano进行部署时,我遇到了大量错误:
[err :: localhost] tar:20120220182722 / app / assets / images / assets / Thumbs.db:无法打开:没有这样的文件或目录
找不到我拥有的每一项资产,并且发现了capistrano错误(进行部署:冷却)
我已在capfile中取消注释这一行:
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
但它仍然说同样的话。
以上行实际上在我的Capfile中,这是我的deploy.rb的其余部分(注意我正在使用vagrant并尝试部署到使用vagrant创建的VM)
require 'bundler/capistrano'
set :application, "testdeploy"
set :scm, :git
set :repository, "."
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
server "localhost", :app, :db, :primary => true
ssh_options[:port] = 2222
ssh_options[:keys] = "~/.rvm/gems/ruby-1.9.3-p125@testdeploy/gems/vagrant-0.9.4/keys/vagrant"
set :user, "vagrant"
set :group, "vagrant"
set :deploy_to, "/var/testdeploy"
set :use_sudo, true
set :deploy_via, :copy
set :copy_strategy, :export
# If you are using Passenger mod_rails uncomment this:
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