teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

Add expression

2020/09/09 17:02

投稿

y_shinoda
y_shinoda

スコア3272

answer CHANGED
@@ -29,5 +29,17 @@
29
29
  pool: 15
30
30
  ```
31
31
 
32
+ Clear DB を使う場合は、次の方法で `DATABASE_URL` を設定します:
33
+ [ClearDB MySQL | Heroku Dev Center](https://devcenter.heroku.com/articles/cleardb#configuring-your-ruby-application-to-use-cleardb)
34
+
35
+ ```console
36
+ $ heroku config | grep CLEARDB_DATABASE_URL
37
+ CLEARDB_DATABASE_URL => mysql://adffdadf2341:adf4234@us-cdbr-east.cleardb.com/heroku_db?reconnect=true
38
+ $ heroku config:set DATABASE_URL='mysql://adffdadf2341:adf4234@us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
39
+ Adding config vars:
40
+ DATABASE_URL => mysql2://adffd...b?reconnect=true
41
+ Restarting app... done, v61.
42
+ ```
43
+
32
44
  また、Clear DB と Rails の場合の公式な手順が次の記事に示されています
33
45
  [Connecting to ClearDB from Heroku using Ruby on Rails on Cedar – ClearDB](https://w2.cleardb.net/developers/resources/connect-ruby/#1.2)