0

カピストラーノで展開しようとしています。サーバーには RVM がインストールされており、ruby のバージョンは 1.93p385 です。

以下は cap production deploy のログです。

http://pastie.org/private/vs336nrgejpwdkuelufnma#

capistrano がデプロイに失敗するのはなぜですか?

展開ファイルは次のとおりです。

require "rvm/capistrano"
require "bundler/capistrano"
set :rvm_ruby_string, "1.9.3-p385"
set :rvm_type, :user #Should the user by the username?
require "capistrano/ext/multistage"

set :http_server, :apache2
set :rake, "#{rake} --trace"
set :application, "app"
set :user,        "myuser" # The server's user for deploys

set :ruby_version, "1.9.3-p385"

set :scm,         "git"
set :repository,  "my git repo here"

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

set :use_sudo,    true

default_run_options[:pty]   = true # Must be set for the password prompt from git to work
ssh_options[:forward_agent] = true

set :nodejs, true

# if you want to clean up old releases on each deploy uncomment this:
after "deploy:restart", "deploy:cleanup"

サーバーはUbuntu 10.04 LTSです

4

2 に答える 2

1
** [out :: server] No such file or directory - /var/www/app/releases/20130216170229/config/database.yml

このパスはサーバー上に存在しますか? /var/www/app/releasesカピストラーノが展開する部分を手動で作成する必要がある場合があります。

于 2013-02-16T17:20:11.417 に答える
0

.gitignore database.ymlカピストラーノ展開によくあるパターンです。その後、データベース構成は に存在し<:deploy_to>/shared/config/ます。この cap タスクを使用して、リリース ディレクトリの db config をシンボリック リンクします。

namespace :deploy do
  task :start do ; end
  task :stop do ; end

  desc "Symlink shared folders on each deployment"
    task :symlink_shared do
    run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
  end
end

before "deploy:assets:precompile", "deploy:symlink_shared"
于 2013-02-16T20:31:30.780 に答える