我有 Windows 7 64 位。我用官方安装程序安装了 ruby200-x64。我可以用 Capistrano 成功部署一次,但现在这种错误一直出现:
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: user@77.77.77.77 (TypeError: no implicit conversion of nil into String)
远程服务器正在运行 CentOS 并且配置正常,因为我可以从 Xubuntu 和 Mac OS 部署到它而没有任何问题。
部署文件如下所示:
set :application, "application_name"
set :repository, "git@bitbucket.org:username/application_name.git"
set :scm, :git
set :use_sudo, false
set :deploy_to, "/var/www/application_name/"
set :deploy_via, :remote_cache
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules"]
server "user@77.77.77.77", :app
namespace :application do
task :symlink, :roles => :app do
run "if [ -d #{shared_path}/uploads ]; then ln -nfs #{shared_path}/uploads #{release_path}/wp-content/uploads; fi"
end
task :chmod_wp, :roles => :app do
run "chmod -R 755 #{release_path}/.*"
run "find #{release_path}/ -type f -exec chmod 644 {} \\;"
end
end
after "deploy:create_symlink", "application:symlink", "application:chmod_wp"
也许有人稍微知道从 Windows 部署有什么问题?