上記の記事の通りにやりました。
デプロイはうまくいったのですが、別のページに飛ぼうとするとAn Internal Error Has Occurredというエラーが出ます。
下はherokuのログです。調べても解決策がよくわかりません。よろしくお願いいたします。
--
2019-09-18T07:49:07.805270+00:00 app[web.1]: 2019-09-18 16:49:07 Error: [Cake\Database\Exception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'heroku_3568fb5fcfa8945.users' doesn't exist
--
php
1//config/app_heroku.php 2<?php 3 4use Cake\Cache\Engine\FileEngine; 5use Cake\Database\Connection; 6use Cake\Database\Driver\Mysql; 7use Cake\Error\ExceptionRenderer; 8use Cake\Log\Engine\FileLog; 9use Cake\Mailer\Transport\MailTransport; 10 11$db = parse_url(env('CLEARDB_DATABASE_URL')); 12return [ 13 14 'debug' => false, 15 16 17 'App' => [ 18 'namespace' => 'App', 19 'encoding' => env('APP_ENCODING', 'UTF-8'), 20 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'), 21 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'), 22 'base' => false, 23 'dir' => 'src', 24 'webroot' => 'webroot', 25 'wwwRoot' => WWW_ROOT, 26 //'baseUrl' => env('SCRIPT_NAME'), 27 'fullBaseUrl' => false, 28 'imageBaseUrl' => 'img/', 29 'cssBaseUrl' => 'css/', 30 'jsBaseUrl' => 'js/', 31 'paths' => [ 32 'plugins' => [ROOT . DS . 'plugins' . DS], 33 'templates' => [APP . 'Template' . DS], 34 'locales' => [APP . 'Locale' . DS], 35 ], 36 ], 37 38 39 'Security' => [ 40 'salt' => env('SALT'), 41 ], 42 43 'Asset' => [ 44 //'timestamp' => true, 45 // 'cacheTime' => '+1 year' 46 ], 47 48 /** 49 * Configure the cache adapters. 50 */ 51 'Cache' => [ 52 'default' => [ 53 'className' => FileEngine::class, 54 'path' => CACHE, 55 'url' => env('CACHE_DEFAULT_URL', null), 56 ], 57 58 59 '_cake_core_' => [ 60 'className' => FileEngine::class, 61 'prefix' => 'myapp_cake_core_', 62 'path' => CACHE . 'persistent/', 63 'serialize' => true, 64 'duration' => '+1 years', 65 'url' => env('CACHE_CAKECORE_URL', null), 66 ], 67 68 69 '_cake_model_' => [ 70 'className' => FileEngine::class, 71 'prefix' => 'myapp_cake_model_', 72 'path' => CACHE . 'models/', 73 'serialize' => true, 74 'duration' => '+1 years', 75 'url' => env('CACHE_CAKEMODEL_URL', null), 76 ], 77 78 79 '_cake_routes_' => [ 80 'className' => FileEngine::class, 81 'prefix' => 'myapp_cake_routes_', 82 'path' => CACHE, 83 'serialize' => true, 84 'duration' => '+1 years', 85 'url' => env('CACHE_CAKEROUTES_URL', null), 86 ], 87 ], 88 89 90 'Error' => [ 91 'errorLevel' => E_ALL, 92 'exceptionRenderer' => ExceptionRenderer::class, 93 'skipLog' => [], 94 'log' => true, 95 'trace' => true, 96 ], 97 98 99 'EmailTransport' => [ 100 'default' => [ 101 'className' => MailTransport::class, 102 /* 103 * The following keys are used in SMTP transports: 104 */ 105 'host' => 'localhost', 106 'port' => 25, 107 'timeout' => 30, 108 'username' => null, 109 'password' => null, 110 'client' => null, 111 'tls' => null, 112 'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null), 113 ], 114 ], 115 116 117 'Email' => [ 118 'default' => [ 119 'transport' => 'default', 120 'from' => 'you@localhost', 121 //'charset' => 'utf-8', 122 //'headerCharset' => 'utf-8', 123 ], 124 ], 125 126 127 'Datasources' => [ 128 'default' => [ 129 'className' => 'Cake\Database\Connection', 130 'driver' => 'Cake\Database\Driver\Mysql', 131 'persistent' => false, 132 'host' => $db['host'], 133 'username' => $db['user'], 134 'password' => $db['pass'], 135 'database' => substr($db['path'], 1), 136 'encoding' => 'utf8', 137 'timezone' => 'UTC', 138 'cacheMetadata' => true, 139 'quoteIdentifiers' => false, 140 ], 141 ], 142 143 144 'Log' => [ 145 'debug' => [ 146 'className' => FileLog::class, 147 'path' => LOGS, 148 'file' => 'debug', 149 'url' => env('LOG_DEBUG_URL', null), 150 'scopes' => false, 151 'levels' => ['notice', 'info', 'debug'], 152 ], 153 'error' => [ 154 'className' => FileLog::class, 155 'path' => LOGS, 156 'file' => 'error', 157 'url' => env('LOG_ERROR_URL', null), 158 'scopes' => false, 159 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], 160 ], 161 ], 162 163 164 'Session' => [ 165 'defaults' => 'php', 166 ], 167]; 168
回答1件
あなたの回答
tips
プレビュー