gpt4 book ai didi

php - 部署到开发服务器时 Capifony 缓存错误

转载 作者:搜寻专家 更新时间:2023-10-31 20:43:58 25 4
gpt4 key购买 nike

我正在尝试使用 capifony 将我的 Symfony2 应用程序部署到我的外部托管的开发服务器,但是我收到以下错误:

--> Updating code base with remote_cache strategy
--> Creating cache directory................................✔
--> Creating symlinks for shared directories................✔
--> Creating symlinks for shared files......................✔
--> Copying Composer from previous release..................✔
--> Updating Composer.......................................✔
--> Updating Composer dependencies..........................✔
--> Building bootstrap file.................................✔
--> Dumping an optimized autoloader.........................✔
--> Installing bundle's assets..............................✔
--> Warming up cache........................................✔
--> Dumping all assets to the filesystem....................✘
*** [err :: x.xx.xx.xxx] PHP Fatal error: Class 'Ivory\GoogleMap\Templating\Helper\Base\CoordinateHelper' not found in /var/www/dev.xyz.co.uk/shared/app/cache/dev/appDevProjectContainer.php on line 462

我的部署脚本中是否遗漏了什么?这是我的 deploy.rb 文件:

set :stage_dir, 'app/config/deploy' # needed for Symfony2 only
set :stages, %w(production staging development)
require 'capistrano/ext/multistage'

set :application, "xyz.co.uk"
set :user, "root" # The server's user for deploys

set :normalize_asset_timestamps, false

set :repository, "git@github.com:xyz/xyz.co.uk.git"
set :scm, :git
set :keep_releases, 3
set :use_sudo, false
set :shared_files, ["app/config/parameters.yml"]
set :web_path, "web"
set :shared_children, [app_path + "/logs", app_path + "/cache", web_path + "/uploads", "vendor"]
set :use_composer, true
set :update_vendors, true
set :dump_assetic_assets, true
set :deploy_via, :remote_cache

#logger.level = Logger::MAX_LEVEL

这是我的 development.rb 文件:

server 'x.xx.xx.xxx', :app, :web, :db, :primary => true
ssh_options[:port] = xxxx
ssh_options[:forward_agent] = true
set :deploy_to, "/var/www/dev.xyz.co.uk"
set :symfony_env_prod, "dev"
set :branch, "develop"

# Need to clear *_dev controllers
set :clear_controllers, false

最佳答案

你不应该在版本之间共享 app/cache。保持这样:

set :shared_files,        ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/uploads"]

关于php - 部署到开发服务器时 Capifony 缓存错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15656654/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com