将Laravel部署到Heroku - 与Jeffrey Way的生成器有关的问题

时间:2014-10-11 11:24:54

标签: heroku laravel push

所以,我尝试将我的Laravel项目部署到Heroku。 在我的Vendor文件夹中,我安装了Jeffrey Way的Generators [/ Vendor / Way]。似乎Heroku没有它。我得到以下内容,我运行git push heroku master

Initializing repository, done.
Counting objects: 88, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (73/73), done.
Writing objects: 100% (88/88), 34.47 KiB | 0 bytes/s, done.
Total 88 (delta 4), reused 0 (delta 0)

-----> PHP app detected
-----> No runtime requirements in composer.json, defaulting to PHP 5.6.1.
-----> Installing system packages...
       - PHP 5.6.1
       - Apache 2.4.10
       - Nginx 1.6.0
-----> Installing PHP extensions...
       - zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
-----> Installing dependencies...
       Composer version 73e9db5d9952d52a46ecbc20a269a8c5f9c5b011 2014-10-07 15:03:19
       Loading composer repositories with package information
       Installing dependencies from lock file
         - Installing symfony/translation (v2.5.5)
           Downloading: 100%         

         - Installing symfony/security-core (v2.5.5)
           Downloading: 100%         

         - Installing symfony/routing (v2.5.5)
           Downloading: 100%         

         - Installing symfony/process (v2.5.5)
           Downloading: 100%         

         - Installing symfony/http-foundation (v2.5.5)
           Downloading: 100%         

         - Installing symfony/event-dispatcher (v2.5.5)
           Downloading: 100%         

         - Installing symfony/debug (v2.5.5)
           Downloading: 100%         

         - Installing psr/log (1.0.0)
           Downloading: 100%         

         - Installing symfony/http-kernel (v2.5.5)
           Downloading: 100%         

         - Installing symfony/finder (v2.5.5)
           Downloading: 100%         

         - Installing symfony/dom-crawler (v2.5.5)
           Downloading: 100%         

         - Installing symfony/css-selector (v2.5.5)
           Downloading: 100%         

         - Installing symfony/console (v2.5.5)
           Downloading: 100%         

         - Installing symfony/browser-kit (v2.5.5)
           Downloading: 100%         

         - Installing swiftmailer/swiftmailer (v5.3.0)
           Downloading: 100%         

         - Installing stack/builder (v1.0.2)
           Downloading: 100%         

         - Installing predis/predis (v0.8.7)
           Downloading: 100%         

         - Installing phpseclib/phpseclib (0.3.8)
           Downloading: 100%         

         - Installing patchwork/utf8 (v1.1.25)
           Downloading: 100%         

         - Installing nesbot/carbon (1.13.0)
           Downloading: 100%         

         - Installing monolog/monolog (1.11.0)
           Downloading: 100%         

         - Installing nikic/php-parser (v0.9.5)
           Downloading: 100%         

         - Installing jeremeamia/superclosure (1.0.1)
           Downloading: 100%         

         - Installing ircmaxell/password-compat (1.0.3)
           Downloading: 100%         

         - Installing filp/whoops (1.1.2)
           Downloading: 100%         

         - Installing d11wtq/boris (v1.0.8)
           Downloading: 100%         

         - Installing symfony/filesystem (v2.5.5)
           Downloading: 100%         

         - Installing classpreloader/classpreloader (1.0.2)
           Downloading: 100%         

         - Installing laravel/framework (v4.2.11)
           Downloading: 100%         

       Generating optimized autoload files
       PHP Fatal error:  Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
       {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Way\\Generators\\GeneratorsServiceProvider' not found","file":"\/tmp\/build_5ed58964-00a1-4095-976d-3975a31d73d8\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error



  [RuntimeException]                                                                                                                                                                                                                   
  Error Output: PHP Fatal error:  Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157  




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] [packages1] ... [packagesN]



 !     Push rejected, failed to compile PHP app

To git@heroku.com:tranquil-shore-5073.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:tranquil-shore-1111.git'

为什么会这样?我该如何解决? 非常感谢!

1 个答案:

答案 0 :(得分:1)

所以这是我的指南如何在Homestead中做到这一点。


1.打开终端并执行$ vagrant ssh
2.将目录更改为项目[例如:$ cd Code/webdev.local]
3。运行$ composer require way/generators --dev [您实际上可以跳过此步骤]
4。更新项目的composer.json" way / generators"到" dev-master"或" 2。*"或" ~3.0" - 取决于您的幼虫版本[例如:

"require-dev": {
        "way/generators": "dev-master"
    }

]


5.Run $composer update
6.导航到您的项目和app / config / local / app.php(如果您没有本地文件夹 - 创建它,然后创建app.php,它像app.php一样开始)并设置'providers'=>array('Way\Generators\GeneratorsServiceProvider'),
7.运行php artisan检查命令

对我来说工作得很好!