2014-08-28 1 views
0

vps에 내 응용 프로그램을 배포하려고 시도했는데이 오류가 발생했습니다! 오류 : # 여기SSHKit :: Runner :: ExecuteError : 호스트 [호스트]에서 실행 중 예외가 발생했습니다. getaddrinfo : 해당 호스트가 알려져 있지 않습니다.

role :app, %w{web334.webfaction.com‏} 
role :web, %w{web334.webfaction.com‏} 
role :db, %w{postgres} 

난에 정상적으로이 응용 프로그램을 배포 할 수있는 일,

도움 내 production.rb 내 deploy.rb

# config valid only for Capistrano 3.1 
lock '3.2.1' 

set :application, 'appname' 
set :repo_url, 'https://[email protected]/' 
set :branch, 'master' 
set :scm, :git 
set :deploy_to, '/home/dir' 

set :deploy_via, :remote_catche 

set :user, "user" 
set :scm_username, "username" 
set :use_sudo, false 

#default_run_options[:pty] = true tried uncomenting this and it threw me an error 

# Default value for :scm is :git 


# Default value for :format is :pretty 
# set :format, :pretty 

# Default value for :log_level is :debug 
# set :log_level, :debug 


namespace :deploy do 
desc "Restart nginx" 
task :restart do 
run "#{deploy_to}/bin/restart" 
end 
end 

입니다 그리고 여기

답변

0

production.rb에서이 role :db, %w{postgres} 파일이 잘못 보입니다. 이것으로 캐피 스트라 노는 postgres을 데이터베이스 서버 URL로 사용하게되며 자연스럽게 실패합니다.

postgres 대신 서버 URL 또는 ip가없는 이유는 무엇입니까? 나는이 작업을해야한다고 가정 앱이 데이터베이스가없는

role :db, %w{web334.webfaction.com‏} 

경우, db 역할을 제거 주시기 바랍니다.

+0

여전히이 오류가 발생합니다. SSHKit :: Runner :: ExecuteError : 호스트 web334.webfactio에서 실행 중 예외가 발생했습니다. n.com? : getaddrinfo : 알려진 호스트가 없습니다. – user2903934

관련 문제