执行capifony命令时遇到问题:cap deploy
。
当错误发生时,我得到这个输出:
* 2013-10-03 18:32:39 executing `symfony:cache:warmup'
--> Warming up cache
* executing "sudo -p 'sudo password: ' sh -c 'cd myapp && php app/console cache:warmup --env=prod --no-debug'"
servers: ["127.0.0.1"]
[127.0.0.1] executing command
*** [err :: 127.0.0.1] No entry for terminal type "unknown";
*** [err :: 127.0.0.1] using dumb terminal settings.
*** [err :: 127.0.0.1] PHP Warning: require_once(myapp/app/bootstrap.php.cache): failed to open stream: No such file or directory in myapp/app/console on line 12
*** [err :: 127.0.0.1] PHP Fatal error: require_once(): Failed opening required 'myapp/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in myapp/app/console on line 12
command finished in 567ms
*** [deploy:update_code] rolling back
* executing "rm -rf myapp; true"
servers: ["127.0.0.1"]
[127.0.0.1] executing command
command finished in 182ms
我必须指出我的deploy.rb看起来像这样:
set :application, "PT"
set :domain, "MY IP"
set :deploy_to, "/var/www/#{application}.es"
set :app_path, "app"
set :repository, "https://github.com/trepafi/repo.git"
set :scm, :git
# Server
set :ssh_options, {:forward_agent => true}
set :user, "root"
set :domain, "#{domain}"
set :model_manager, "doctrine"
role :web, domain
role :app, domain, :primary => true
set :keep_releases, 3
set :deploy_via, :rsync_with_remote_cache
logger.level = Logger::MAX_LEVEL
# S2.4
set :use_composer, true
set :vendors_mode, "install"
set :shared_files, ["app/config/parameters.ini"]
set :shared_children, [app_path + "/cache", app_path + "/logs", web_path + "/uploads", "vendor"]
set :update_vendors, true
我猜清除S2缓存是错误的,我该如何授予相应文件夹的权限?
有谁知道如何修复它?
答案 0 :(得分:1)
最后我得到了解决方案,那是因为新的S2版本。共享文件已从parameters.ini重命名为parameters.yml
set :shared_files, ["app/config/parameters.yml"]