سؤال
أنا أحاول أن نشر إلى slicehost شريحة باستخدام هذا التكوين/نشر/الإنتاج.rb الملف.أنا جاهل & لم تستخدم كابيسترانو قبل الآن.هنا هي الخطوات التي اتبعت.آسف ولكن أنا جديدة تماما كابيسترانو.فإنه يسأل عن كلمة المرور الخاصة بي (إعداد باسفوردلس SSH) ، ورمي الخطأ هذه:
(SocketError: getaddrinfo: Name or service not known)
connection failed for: ---------.com (Net::SSH::AuthenticationFailed: -----)
أولا, انها 'البورت' التطبيق http://github.com/fudgestudios/bort/tree/master
ثانيا انا استخدم ubuntu-آلة جوهرة مفصلة هنا:
http://suitmymind.github.com/ubuntu-machine/#screencast
config/نشر/الإنتاج.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 بدلا من ذلك ؟
نصائح أخرى
"SocketError:getaddrinfo:اسم أو خدمة غير معروفة" يعني نوعا من المشكلة من حل أو الاتصال بالمضيف البعيد.هل تأكدت من أنه يمكنك الاتصال يدويا ؟
طريقة واحدة للبدء في تصحيح كاب النصوص هو تنفيذ كل خطوة من العملية نفسك.يمكنك نسخ البيانات مباشرة من مطول سقف الانتاج.التي ينبغي أن تساعد في عزل المشكلة ، في هذه الحالة ، حيث الاتصال المشكلة (slicehost?, جيثب?, على حد سواء؟).