执行cap deploy:setup
时,我没有收到任何错误消息。它尝试将文件夹/myapp
创建为mkdir -p /home/user/apps/myapp
,还尝试创建其他文件夹(发布,共享)。没有权限问题,因为我可以在终端中执行mkdir -p /home/user/apps/myapp
而没有任何错误。此外,cap deploy:check
会发出You appear to have all necessary dependencies installed
条消息。我应该用cap deploy:setup
创建这些文件夹吗?如果是这样,为什么我没有收到任何错误消息以及创建的文件夹?
这是我的config / deploy.rb文件:
set :application, "myapp"
set :location, "myserver"
set :domain, "apps.mydomain.com"
set :user, "app_admin"
set :repository, "svn+ssh://app_admin@192.168.XXX.XXX/home/svn/myapp"
set :svn_username, "svn_admin"
set :svn_password, "password"
set :use_sudo, false
set :scm, :subversion
default_run_options[:pty] = true
role :web, location
role :app, location
role :db, location, :primary => true
set :deploy_to, "/home/app_admin/#{application}"
set :deploy_via, :checkout
ssh_options[:forward_agent] = true
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
task :stop, :roles => :app do
#do nothing
end
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
end
答案 0 :(得分:-8)
什么是capistrano版本?什么OS? 我在Ubuntu中遇到了Capistrano的问题 - 尝试Windows!我经常发现Windows是最好的服务器平台。除了不常发生的崩溃,Windows服务器非常强大。