私は最初のRails 3アプリをvdsで実行しようとしています。だから、カピストラーノを使うことに決めました。また、私はPhusionの乗客、Nginx、RVMとルビー1.9.3があります。Capistrano経由でRailsアプリをデプロイできない
私はチュートリアルとして、このリンクを使用する - 私は[OK]をすべて
cap deploy:check
を印刷するとき、そうhttps://github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning
:
* executing `deploy:check'
* executing "test -d /vol/www/apps/ror_tutorial/releases"
servers: ["188.127.224.136"]
Password: <my password>
[188.127.224.136] executing command
command finished in 87ms
* executing "test -w /vol/www/apps/ror_tutorial"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 63ms
* executing "test -w /vol/www/apps/ror_tutorial/releases"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 72ms
* executing "which git"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 65ms
You appear to have all necessary dependencies installed
をしかし、私は、次の手順を実行しようとすると:
cap deploy:update
奇妙なエラーが表示されます:
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote [email protected]:Loremaster/sample_app.git master"
command finished in 4097ms
* executing "git clone -q [email protected]:Loremaster/sample_app.git /vol/www/apps/ror_tutorial/releases/20120118170908 && cd /vol/www/apps/ror_tutorial/releases/20120118170908 && git checkout -q -b deploy f0cf5d0141c80ab82d9191e72aabeddb8cf6e552 && (echo f0cf5d0141c80ab82d9191e72aabeddb8cf6e552 > /vol/www/apps/ror_tutorial/releases/20120118170908/REVISION)"
servers: ["188.127.224.136"]
Password: <my password>
[188.127.224.136] executing command
** [188.127.224.136 :: out] Permission denied (publickey).
** fatal: The remote end hung up unexpectedly
command finished in 1573ms
*** [deploy:update_code] rolling back
* executing "rm -rf /vol/www/apps/ror_tutorial/releases/20120118170908; true"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 63ms
failed: "sh -c 'git clone -q [email protected]:Loremaster/sample_app.git /vol/www/apps/ror_tutorial/releases/20120118170908 && cd /vol/www/apps/ror_tutorial/releases/20120118170908 && git checkout -q -b deploy f0cf5d0141c80ab82d9191e72aabeddb8cf6e552 && (echo f0cf5d0141c80ab82d9191e72aabeddb8cf6e552 > /vol/www/apps/ror_tutorial/releases/20120118170908/REVISION)'" on 188.127.224.136
どうすれば修正できますか?ここで
である私ののconfig/deploy.rb:あなたは公開リポジトリのアドレスを使用する必要が
set :user, "root"
default_run_options[:pty] = true
set :repository, "[email protected]:Loremaster/sample_app.git"
set :application, "ror_tutorial"
set :deploy_to, "/vol/www/apps/#{application}"
set :scm, :git
set :branch, "master"
server "188.127.224.136", :app,
:web,
:db, :primary => true
namespace :passenger do
desc "Restart Application"
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end
after :deploy, "passenger:restart"
私のプライベートキーがクローンを実行しているマシンに存在しないときに、この問題が発生しました。 –