0

我想将我的 Symfony2 项目部署到我的服务器和 capifony 中,但我有一个问题:

[server.com] executing command
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/css: No such file or directory
*** [err :: server.com] 
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/images: No such file or directory
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/js
*** [err :: server.com] : No such file or directory

脚本继续,但我还有其他错误

* executing "cd /home/app/src/releases/20120207163503 && /usr/local/php5/bin/php bin/vendors install --reinstall"
servers: ["server.com"]
[server.com] executing command
 ** [out :: server.com] X-Powered-By: PHP/5.3.8-pl0-gentoo
 ** [out :: server.com] Content-type: text/html
 ** [out :: server.com] 
 ** [out :: server.com] <br />
 ** [out :: server.com] <b>Warning</b>:  Wrong parameter count for parse_ini_file() in <b>/home/app/src/releases/20120207163503/bin/vendors</b> on line <b>69</b><br />
  ** [out :: server.com] <br />
  ** [out :: server.com] <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/app/src/releases/20120207163503/bin/vendors</b> on line <b>73</b><br />
 *** [err :: server.com] sh: ./vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php: No such file or directory
 *** [err :: server.com] sh: ./app/console: No such file or directory
 *** [err :: server.com] sh: ./app/console: No such file or directory
     command finished in 369ms

我遵循了ServerGrove 教程

这是我的 deploy.rb 文件

set :serverName,   "server.com" # The server's hostname
set :repository,   "file:///Applications/MAMP/htdocs/sf2"

set :domain,      "server.com"
set :deploy_to,   "/home/app/src" # Remote location where the project will be stored
ssh_options[:port] = "22"

set :scm,         :git
set :deploy_via,  :rsync_with_remote_cache
set :user,        "root"

# Roles
role :web,        domain
role :app,        domain
role :db,         domain, :primary => true

set  :keep_releases,  3 # The number of releases which will remain on the server
set  :use_sudo,       false

# Update vendors during the deploy
set :update_vendors, true

# Set some paths to be shared between versions
set :shared_files,    ["app/config/parameters.ini"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor"]

编辑:我已将 php 版本更改为 5.3.8 并且完全相同的错误。

4

3 回答 3

0

问题并非来自 Capifony。看起来您只需要在deps文件末尾添加一个新行。然后尝试再次部署。

希望有帮助!

于 2012-02-08T17:56:21.943 回答
0

./bin/vendors install --reinstall在尝试 capifony(官方文档)到另一台服务器之前,请确保您的项目正在本地计算机上运行(运行)。

在我看来,您使用的依赖版本不匹配。我会将这些文件(,,,)的内容./bin/vendorsdepsSymfony Standard 发行版deps.lock中打包的内容进行比较。

希望能帮助到你 :)

于 2012-02-08T20:49:52.320 回答
0

我发现了问题。

这是因为 git 没有为所有用户安装到服务器中......

于 2012-02-13T08:46:35.003 回答