新しいサイトを展開しようとしていますが、奇妙なエラーが発生する理由がわかりません。
私の最初のエラーは次のとおりです。
Users/Epok/.rvm/gems/ruby-1.9.3-p448/gems/capifony-2.2.10/lib/capifony_symfony1.rb:40:in `read': No such file or directory - config/databases.yml (Errno::ENOENT)
from /Users/Epok/.rvm/gems/ruby-1.9.3-p448/gems/capifony-2.2.10/lib/capifony_symfony1.rb:40:in `guess_symfony_orm'
from /Users/Epok/.rvm/gems/ruby-1.9.3-p448/gems/capifony-2.2.10/lib/capifony_symfony1.rb:27:in `block in load'
capifony が Symfony 1 のファイルである database.yml を要求する理由がわかりません (と思います)
だから私は置きます:set:use_orm, false(ドキュメントがsymfony1プロジェクトについて述べているように)そしてそれは動作しますが、今は次の新しいエラーがあります:
* executing "sh -c 'cd /usr/share/nginx/www/stackexchange/releases/20130820143357 && php ./symfony cache:clear'"
servers: ["37.187.66.229"]
[37.187.66.229] executing command
** [out :: 37.187.66.229] Could not open input file: ./symfony
command finished in 255ms
*** [deploy:update_code] rolling back
* executing "rm -rf /usr/share/nginx/www/stackexchange/releases/20130820143357; true"
servers: ["37.187.66.229"]
[37.187.66.229] executing command
command finished in 113ms
failed: "sh -c 'sh -c '\\''cd /usr/share/nginx/www/stackexchange/releases/20130820143357 && php ./symfony cache:clear'\\'''" on 37.187.66.229
capifony を使用してから長い時間が経ちましたが、この種のエラーは一度もありません。同じファイルを再利用しますが、確かに何かが欠けています。前もって感謝します :)
私のデプロイファイルは次のようなものです:
# setup server
set :application, "Stackexchange Network"
set :domain, "37.187.66.229"
set :deploy_to, "/usr/share/nginx/www/stackexchange"
role :web, domain
role :app, domain
# git configuration
set :scm, :git
set :branch, "master"
set :repository, "file:///Applications/MAMP/htdocs/6.symfony_project/stackexchange"
set :deploy_via, :copy
ssh_options[:forward_agent] = true
# ssh log
set :user, "user"
set :password, "password"
set :use_sudo, false
set :keep_releases, 3
default_run_options[:pty] = true
# Symfony2 configuration
set :clear_controllers, true
set :controllers_to_clear, ['app_*.php']
set :model_manager, "doctrine"
set :use_orm, false
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, ["app/logs", "app/cache"]
set :use_composer, true
set :update_vendors, true
set :dump_assetic_assets, true
set :writable_dirs, ["app/cache", "app/cache/prod", "app/cache/dev", "app/logs", "vendor"]
set :webserver_user, "www-data"
set :permission_method, :chown
set :use_set_permissions, true
before 'symfony:composer:update', 'symfony:copy_vendors'
after 'symfony:cache:warmup', 'deploy:cleanup'
namespace :symfony do
desc "Copy vendors from previous release"
task :copy_vendors, :except => { :no_release => true } do
if Capistrano::CLI.ui.agree("Do you want to copy last release vendor dir then do composer install ?: (y/N)")
capifony_pretty_print "--> Copying vendors from previous release"
run "cp -a #{previous_release}/vendor #{latest_release}/"
capifony_puts_ok
end
end
end
# logger.level = Logger::INFO
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL