我試圖使用capistrano將部署安裝到AWS EC2實例。爲了測試,我使用Amazon AWS,cap部署:檢查失敗
cap testing deploy:check
但Capistrano的失敗:
triggering load callbacks
* 2013-03-12 15:41:27 executing `testing'
triggering start callbacks for `deploy:check'
* 2013-03-12 15:41:27 executing `multistage:ensure'
* 2013-03-12 15:41:27 executing `deploy:check'
* executing "test -d /......./releases"
servers: ["ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com"]
connection failed for: ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
(NoMethodError: undefined method `each' for "publickey":String)
我用我的.pem文件連接,以及deploy.rb腳本如下所示:
set :stages, %w(production testing)
set :default_stage, 'testing'
require 'capistrano/ext/multistage'
set :application, 'app_name'
set :user, 'the_user'
set :group, 'the_group'
set :scm, :git
set :repository, "[email protected]:......./#{application}.git"
set :deploy_to, '/......./'
set :deploy_via, :remote_cache
# Authentication setup
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:auth_methods] = 'publickey'
ssh_options[:keys] = ['~/........pem']
任何想法爲什麼會發生這種情況?