我想在使用Capistrano的Rails應用程序上實現紅寶石,我在生產服務器中的臨時服務器和nginx REE版本中運行Apache rvm。我也使用git。 我一直試圖整合Capistrano的,但我收到此錯誤capistrano與Ubuntu的EC2實例在軌道上部署紅寶石
(Net::SSH::AuthenticationFailed: ubuntu)
這裏是我的deploy.rb文件
set :application, "capify"
# The directory on the EC2 node that will be deployed to
set :deploy_to, "/home/ubuntu/apps/#{application}"
set :keep_releases, 3
# deploy with git
set :scm, :git
set :repository, "[email protected]:username/capify.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, false
set :user, "ubuntu"
ssh_options[:keys] = ["/path/tp/key.pem"]
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
# The address of the remote host on EC2 (the Public DNS address)
set :location, "ip"
# setup some Capistrano roles
role :app, location
role :web, location
role :db, location, :primary => true
after 'deploy:update_code', 'deploy:symlink_db'
namespace :deploy do
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{deploy_to}/#{shared_dir}/tmp/restart.txt"
end
desc "Symlinks the database.yml"
task :symlink_db, :roles => :app do
run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"
end
end
找不出確切的問題和方法,以整合Capistrano的。
你是如何得到它的工作?我也有相同的[問題](http://stackoverflow.com/questions/30858269/sshkitrunnerexecuteerror-exception-while-running-cap-production-deployc)..任何幫助嗎? –