我用这个简短的shell脚本(gist link)创建了一个全新的Laravel 5项目,并在Fortrabbit上创建了一个应用程序来部署它。当我把所有东西都检查成git并将其推高时我得到了以下错误:
Deployment file:
not found
Pre-script:
not found
0ms
Composer:
- - -
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
[ErrorException]
Undefined index: driver
Script php artisan optimize handling the post-install-cmd event returned with error code 1
- - -
A B O R T E D
!! Failure in build execution: Failure in composer execution
我的composer.json是Laravel安装的默认设置:
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
导致此错误的原因是什么?如何解决?谢谢