本文介绍了capistrano错误:../ current:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用capistrano进行部署,但是当我进行cap deploy:update时,它没有创建/ current文件夹,这是错误,有什么想法吗?
I'm trying to deploy using capistrano but when I do cap deploy:update it's not creating a /current folder, here's the error, any ideas?
executing "cd /home/adamtodd/apps/homebase/current && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile --trace"
servers: ["xx.xxx.xx.xxx"]
[xx.xxx.xx.xxx] executing command
** [out :: xx.xxx.xx.xxx] bash: line 0: cd: /home/adamtodd/apps/homebase/current: No such file or directory
推荐答案
当我使用Ben Curtis解决方案进行资产预编译时,我遇到了同样的问题()(部署:冷对我没有帮助)
I had the same problem when I used Ben Curtis solution for assets precompilation (assets:precompile task redifinition) on first-time deploy (deploy:cold didn't help me)
简单的解决方法
namespace :deploy do
namespace :assets do
task :precompile, :roles => :web, :except => { :no_release => true } do
begin
from = source.next_revision(current_revision) # <-- Fail here at first-time deploy because of current/REVISION absence
rescue
err_no = true
end
if err_no || capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
else
logger.info "Skipping asset pre-compilation because there were no asset changes"
end
end
end
end
这篇关于capistrano错误:../ current:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!