2016-05-23 26 views
0

私は最初のLaravelプロジェクトをHerokuに配備しようとしました。これは小さなプロジェクトなので、SQLiteをデータベースとして使用しています。 git push heroku masterを使用してプロジェクトを展開し、インデックスを表示するには、データベースからデータを取得するのリンクをクリックした後、私は次のエラーを取得しています:HerokuにLaravelを配備する "Connector.php 55行目(sqlite)のPDOException

PDOException in Connector.php line 55: could not find driver 
in Connector.php line 55 
at PDO->__construct('sqlite:/app/database/database.sqlite', null, null, array('0', '2', '0', false, false)) in Connector.php line 55 
at Connector->createConnection('sqlite:/app/database/database.sqlite', array('driver' => 'sqlite', 'database' => '/app/database/database.sqlite', 'prefix' => '', 'name' => 'sqlite'), array('0', '2', '0', false, false)) in SQLiteConnector.php line 37 
at SQLiteConnector->connect(array('driver' => 'sqlite', 'database' => '/app/database/database.sqlite', 'prefix' => '', 'name' => 'sqlite')) in ConnectionFactory.php line 61 
at ConnectionFactory->Illuminate\Database\Connectors\{closure}() 
at call_user_func(object(Closure)) in Connection.php line 875 
at Connection->getPdo() in Connection.php line 743 
at Connection->reconnectIfMissingConnection() in Connection.php line 628 
at Connection->run('select * from "certificates" order by "updated_at" desc', array(), object(Closure)) in Connection.php line 342 
at Connection->select('select * from "certificates" order by "updated_at" desc', array(), true) in Builder.php line 1562 
at Builder->runSelect() in Builder.php line 1548 
at Builder->get(array('*')) in Builder.php line 610 
at Builder->getModels(array('*')) in Builder.php line 316 
at Builder->get() in CertificatesController.php line 25 
at CertificatesController->index() 
at call_user_func_array(array(object(CertificatesController), 'index'), array()) in Controller.php line 80 
at Controller->callAction('index', array()) in ControllerDispatcher.php line 146 
at ControllerDispatcher->call(object(CertificatesController), object(Route), 'index') in ControllerDispatcher.php line 94 
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96 
at ControllerDispatcher->callWithinStack(object(CertificatesController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 54 
at ControllerDispatcher->dispatch(object(Route), object(Request), 'app\Http\Controllers\CertificatesController', 'index') in Route.php line 174 
at Route->runController(object(Request)) in Route.php line 140 
at Route->run(object(Request)) in Router.php line 724 
at Router->Illuminate\Routing\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64 
at VerifyCsrfToken->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49 
at ShareErrorsFromSession->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62 
at StartSession->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59 
at EncryptCookies->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 
at Pipeline->then(object(Closure)) in Router.php line 726 
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699 
at Router->dispatchToRoute(object(Request)) in Router.php line 675 
at Router->dispatch(object(Request)) in Kernel.php line 246 
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44 
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) 
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 
at Pipeline->then(object(Closure)) in Kernel.php line 132 
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99 
at Kernel->handle(object(Request)) in index.php line 53 

誰もが、私はこの問題を解決することができるかもしれ方法を知っています?事前に多くの感謝! :)

答えて

-1

SqliteはHerokuの共有拡張機能としてセットアップされていますが、composer.jsonで有効にする必要があります。

{ 
    "require": { 
     "sqlite3": "*" 
    } 
} 

をごcomposer.jsonファイルに:

を追加してみてください。

2

また、これはHerokuで発生しました。

私が追加:

{ 
    "require": { 
     "ext-pdo_sqlite": "*" 
    } 
} 
+1

をそれは素晴らしい仕事を!!!! –

関連する問題