1

Rails アプリを Capistrano でデプロイするのに問題があります。ec2_domain エラーで接続に失敗しました。

* 2013-08-24 19:50:51 executing `deploy:setup'
* executing "mkdir -p /home/ubuntu/www/crowdcode /home/ubuntu/www/crowdcode/releases /home/ubuntu/www/crowdcode/shared /home/ubuntu/www/crowdcode/shared/system /home/ubuntu/www/crowdcode/shared/log /home/ubuntu/www/crowdcode/shared/pids"
servers: [ec2_domain]
connection failed for: ec2_domain (SocketError: getaddrinfo: Name or service not known)

私の deploy.rb ファイルの内容は次のとおりです。

require "bundler/capistrano"

#set :application, "set your application name here"
set :repository,  "https://github.com/path/to/code.git"
set :scm, :git
set :branch, "master"

set :user, "ubuntu"
set :use_sudo, false
set :deploy_to, "/home/ubuntu/www/crowdcode"

# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent    guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, ec2_domain                          # Your HTTP server, Apache/etc
role :app, ec2_domain                          # This may be the same as your `Web` server
role :db,  ec2_domain, :primary => true # This is where Rails migrations will run
#role :db,  "your slave db-server here"

# if you want to clean up old releases on each deploy uncomment this:
# after "deploy:restart", "deploy:cleanup"

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end

ssh_options[:keys] = ["/home/ubuntu/.ssh/first_pair.pem"]
ssh_options[:forward_agent] = true

このエラーの原因がわかりません。いくつかのチュートリアルを見てきましたが、エラーを修正できないようです。問題が何であるかについて誰にも考えがありますか?

4

0 に答える 0