Domanda

Sto provando a distribuire in un slice slicehost usando questo file config / deploy / production.rb. Sono all'oscuro & amp; non ho mai usato capistrano prima d'ora. Ecco i passaggi che ho seguito. Scusa ma sono completamente nuovo a Capistrano. Continua a chiedere la mia password (ho impostato SSH senza password) e genera questo errore:

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

Innanzitutto, è un'app "bort" http://github.com/fudgestudios/bort / albero / master

In secondo luogo, ho usato la gemma di Ubuntu-machine, dettagliata qui:

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
È stato utile?

Soluzione

Penso che il problema potrebbe essere

  • Non è possibile risolvere il nome host
  • Hai sbagliato a digitare domain value

Per ogni evenienza, hai provato a impostare il valore domain come indirizzo IP del tuo server?

Altri suggerimenti

" SocketError: getaddrinfo: nome o servizio non noto " implica una sorta di risoluzione dei problemi o connessione all'host remoto. Hai verificato che puoi connetterti manualmente?

Un modo per iniziare a eseguire il debug degli script cap consiste nell'eseguire personalmente ogni fase del processo. È possibile copiare le istruzioni direttamente dall'output dettagliato cap. Ciò dovrebbe aiutare a isolare il problema, in questo caso, in cui si trova il problema di connessione (slicehost ?, github ?, entrambi?).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top