无法将Symfony应用程序部署到Heroku

瓦莱里

起初,对这个愚蠢的问题感到抱歉,但我像Symfony一样在Heroku中是新来的。我正在学习Symfony,现在尝试将我的应用程序部署到Heroku。但是在推送到heroku之后,我有错误无法解决。我搜索了答案,但没有找到解决方案。我的环境切换到PROD。这是我认为可以用来分析的文件堆。

    Initializing repository, done.
Counting objects: 8783, done.
Delta compression using up to 3 threads.
Compressing objects: 100% (7959/7959), done.
Writing objects: 100% (8783/8783), 6.34 MiB | 499.00 KiB/s, done.
Total 8783 (delta 2737), reused 0 (delta 0)

-----> PHP app detected
-----> Resolved composer.lock requirement for PHP >=5.3.3 to version 5.6.2.
-----> Installing system packages...
       - PHP 5.6.2
       - Apache 2.4.10
       - Nginx 1.6.0
-----> Installing PHP extensions...
       - zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
-----> Installing dependencies...
       Composer version 1.0-dev (a309e1d89ded6919935a842faeaed8e888fbfe37) 2014-10-20 19:16:14

 !     WARNING: You have put Composer's vendor directory under version control.
       That directory should not be in your Git repository; only composer.json
       and composer.lock should be added, with Composer handling installation.
       Please 'git rm --cached vendor/' to remove the folder from your index,
       then add '/vendor/' to your '.gitignore' list to remove this notice.
       For more information, refer to the Composer FAQ: http://bit.ly/1rlCSZU

       Loading composer repositories with package information
       Installing dependencies from lock file
         - Removing sensio/generator-bundle (v2.4.0)
       Generating optimized autoload files
       Updating the "app/config/parameters.yml" file
       PHP Fatal error:  Class 'Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle' not found in /tmp/build_a721f054a4c0177a8e4e060c5b747b1c/app/AppKernel.php on line 26
       Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception



  [RuntimeException]                                                         
  An error occurred when executing the "'cache:clear --no-warmup'" command.  



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]



 !     Push rejected, failed to compile PHP app

这是composer.json的内容:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/", "SymfonyStandard": "app/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.5.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0",
        "sensio/framework-extra-bundle": "~3.0",
        "incenteev/composer-parameter-handler": "~2.0",
        "sensio/generator-bundle": "~2.4"
    },
    "require-dev": {
    },
    "scripts": {
        "post-root-package-install": [
            "SymfonyStandard\\Composer::hookRootPackageInstall"
        ],
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.5-dev"
        }
    }
}

和AppKernel.php内容:

<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new Irishdash\StorageBundle\IrishdashStorageBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}
亚当·埃尔索达尼

首先,请遵循Heroku警告中收到的指示。

请'git rm --cached vendor /'从索引中删除文件夹,然后在'.gitignore'中添加'/ vendor /'。

然后将.gitignore文件的更改提交到Git。

接下来,它正在从锁定文件中安装依赖项,但是看起来您已将sensio/generator-bundle软件包移至requirefrom中require-dev

鉴于此,请尝试运行php composer.phar update,然后将composer.lock文件的更改提交给Git。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法将我的 symfony 应用程序部署到 heroku

来自分类Dev

无法将Rails应用程序部署到heroku

来自分类Dev

无法将应用程序部署到heroku

来自分类Dev

无法将 rails 应用程序部署到 heroku

来自分类Dev

我的应用程序无法部署到 heroku

来自分类Dev

无法将Django应用程序部署到Heroku“未检测到Cedar支持的应用程序”

来自分类Dev

将Rails应用程序部署到Heroku时出现“无法加载此类文件”错误

来自分类Dev

将Rails应用程序部署到Heroku时出现“无法加载此类文件”错误

来自分类Dev

将AngularJS应用程序部署到Heroku,无法找到合适的角度动画版本

来自分类Dev

将 sinatra 应用程序部署到 heroku 的神秘错误:bundler:无法加载命令:rackup

来自分类Dev

将应用程序部署到 Heroku 后无法调用 API

来自分类Dev

无法使用 django-allauth 将 django 应用程序部署到 heroku

来自分类Dev

将Meteor 0.8.3应用程序部署到Heroku

来自分类Dev

将Flask应用程序部署到Heroku时出错

来自分类Dev

将Node js应用程序部署到Heroku

来自分类Dev

使用ActionCable将Rails应用程序部署到Heroku

来自分类Dev

将NodeJS应用程序部署到Heroku

来自分类Dev

将烧瓶应用程序部署到 heroku 错误

来自分类Dev

如何将 Kotlin 应用程序部署到 Heroku?

来自分类Dev

将 angular-universal 应用程序部署到 heroku

来自分类Dev

无法将Flask应用程序部署到Heroku(Heroku尝试安装SQlite,即使我根本不使用它)

来自分类Dev

部署到Heroku应用程序错误

来自分类Dev

将Node.js应用程序部署到Heroku的应用程序错误

来自分类Dev

无法将Spring Boot应用程序部署到Azure

来自分类Dev

无法将应用程序部署到设备

来自分类Dev

无法将Web应用程序从Eclipse部署到tomcat

来自分类Dev

当我将Django应用程序部署到Heroku时,为什么collectstatic无法自动运行?

来自分类Dev

由于硬编码的端口号,无法将node.js应用程序部署到heroku

来自分类Dev

使用git push将Django应用程序部署到heroku时出现无法识别的错误

Related 相关文章

  1. 1

    无法将我的 symfony 应用程序部署到 heroku

  2. 2

    无法将Rails应用程序部署到heroku

  3. 3

    无法将应用程序部署到heroku

  4. 4

    无法将 rails 应用程序部署到 heroku

  5. 5

    我的应用程序无法部署到 heroku

  6. 6

    无法将Django应用程序部署到Heroku“未检测到Cedar支持的应用程序”

  7. 7

    将Rails应用程序部署到Heroku时出现“无法加载此类文件”错误

  8. 8

    将Rails应用程序部署到Heroku时出现“无法加载此类文件”错误

  9. 9

    将AngularJS应用程序部署到Heroku,无法找到合适的角度动画版本

  10. 10

    将 sinatra 应用程序部署到 heroku 的神秘错误:bundler:无法加载命令:rackup

  11. 11

    将应用程序部署到 Heroku 后无法调用 API

  12. 12

    无法使用 django-allauth 将 django 应用程序部署到 heroku

  13. 13

    将Meteor 0.8.3应用程序部署到Heroku

  14. 14

    将Flask应用程序部署到Heroku时出错

  15. 15

    将Node js应用程序部署到Heroku

  16. 16

    使用ActionCable将Rails应用程序部署到Heroku

  17. 17

    将NodeJS应用程序部署到Heroku

  18. 18

    将烧瓶应用程序部署到 heroku 错误

  19. 19

    如何将 Kotlin 应用程序部署到 Heroku?

  20. 20

    将 angular-universal 应用程序部署到 heroku

  21. 21

    无法将Flask应用程序部署到Heroku(Heroku尝试安装SQlite,即使我根本不使用它)

  22. 22

    部署到Heroku应用程序错误

  23. 23

    将Node.js应用程序部署到Heroku的应用程序错误

  24. 24

    无法将Spring Boot应用程序部署到Azure

  25. 25

    无法将应用程序部署到设备

  26. 26

    无法将Web应用程序从Eclipse部署到tomcat

  27. 27

    当我将Django应用程序部署到Heroku时,为什么collectstatic无法自动运行?

  28. 28

    由于硬编码的端口号,无法将node.js应用程序部署到heroku

  29. 29

    使用git push将Django应用程序部署到heroku时出现无法识别的错误

热门标签

归档