質問

このconfig / deploy / production.rbファイルを使用して、スライスホストスライスにデプロイしようとしています。私は無知です&今までカピストラーノを使用したことがありません。ここに私が従った手順があります。申し訳ありませんが、私はカピストラーノはまったく新しいです。パスワードを要求し続け(パスワードなしのSSHをセットアップした)、このエラーをスローします:

(SocketError: getaddrinfo: Name or service not known)
connection failed for: ---------.com (Net::SSH::AuthenticationFailed: -----)

まず、これは「bort」アプリです http://github.com/fudgestudios/bort / tree / master

第二に、ここで詳しく説明するubuntu-machine gemを使用しました:

http://suitmymind.github.com/ubuntu-machine/#screencast

config / deploy / production.rb

#############################################################
#   Application
#############################################################

set :application, "---------------"
set :deploy_to, "/var/www/#{application}"

#############################################################
#   Settings
#############################################################

default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :use_sudo, true
set :scm_verbose, true
set :rails_env, "production" 

#############################################################
#   Servers
#############################################################

set :user, "----------"
set :domain, "--------------------------"
server domain, :app, :web
role :db, domain, :primary => true

#############################################################
#   Git
#############################################################

set :scm, :git
set :branch, "master"
set :scm_user, '---------'
set :scm_passphrase, "----------"
set :repository, "git@github.com:--------/----------.git"
set :deploy_via, :remote_cache

#############################################################
#   Passenger
#############################################################

namespace :deploy do
  desc "Create the database yaml file"
  task :after_update_code do
    db_config = <<-EOF
    production:    
      adapter: mysql
      encoding: utf8
      username: root
      password: ------------
      database: ------------_production
      host: localhost
    EOF

    put db_config, "#{release_path}/config/database.yml"

    #########################################################
    # Uncomment the following to symlink an uploads directory.
    # Just change the paths to whatever you need.
    #########################################################

    desc "Symlink the assets directories"
     task :before_symlink do
       run "mkdir -p #{shared_path}/assets"
       run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
     end

  end

  # Restart passenger on deploy
  desc "Restarting mod_rails with restart.txt"
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{current_path}/tmp/restart.txt"
  end

  [:start, :stop].each do |t|
    desc "#{t} task is a no-op with mod_rails"
    task t, :roles => :app do ; end
  end

end
役に立ちましたか?

解決

問題は次のいずれかだと思います

  • ホスト名を解決できません
  • 間違った domain 値をタイプミスしました

念のため、代わりに domain の値をサーバーのIPアドレスに設定しようとしましたか?

他のヒント

&quot; SocketError:getaddrinfo:Name or service notknown&quot; は、リモートホストへの解決または接続に何らかの問題があることを意味します。手動で接続できることを確認しましたか?

capスクリプトのデバッグを開始する1つの方法は、プロセスの各ステップを自分で実行することです。詳細なcap出力からステートメントを直接コピーできます。この場合、接続の問題がある場所(slicehost?、github ?、両方?)の問題を切り分けるのに役立つはずです。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top