** It is supposed to confirm the operation more reliably in the production environment after the development. I hope you can think of it. ** **
** ・ I will explain the simple flow leading up to the work to be done this time. ** ** This time it is a connection method of Heroku and Sequel, so I will use it in the process I will omit the explanation of commands etc.
First, after pushing the local repository to the remote repository Push to Heroku. Next, add the application information to Heroku Now that we have done it, we will check it in the production environment. You can check the operation in the production environment as it is, but in the production environment I can't confirm that the actions I have taken are properly saved in Sequel Pro. However, it would be better to be able to confirm it properly here.
Now let's connect to actually check! Please refer to the following for the connection method.
** First, enter the following command in the terminal. ** **
Terminal
% heroku config
** After inputting, execute it and the information will be displayed as shown below. ** **
Terminal
test@testAir testtext % heroku config
=== testtext Config Vars
CLEARDB_DATABASE_URL: mysql://username:password@host/Database?reconnect=true
DATABASE_URL: mysql2://username:password@host/Database?reconnect=true
LANG: en_US.UTF-8
RACK_ENV: production
RAILS_ENV: production
RAILS_LOG_TO_STDOUT: enabled
RAILS_MASTER_KEY: c5aef76eac83535f519216e8aaa4a254
RAILS_SERVE_STATIC_FILES: enabled
SECRET_KEY_BASE: 0026593c36ba4b8f040237f98b42e26008b4ae2fc0e9fcd3c092096aca685c579df7bfc6f331b834fbe0faac07ac726b3a759cfe86d7de2e64b3b89ddcbb0912
** Now check the CLEARDB_DATABASE_URL in the terminal I was able to. ** ** Now that I've confirmed it, I'll go next.
** First, select standard instead of socket as shown in the image below. ** **
** After selecting, enter the information confirmed in the terminal (the information below) so that it applies to the item. ** **
** ⚠️ It is okay not to enter //,:, @, /?, Before and after displayed in the information below. Please enter the information of the contents enclosed in //,:, etc. ** </ font>
Terminal
% CLEARDB_DATABASE_URL: mysql://username:password@host/Database?reconnect=true
** After entering, do not connect immediately and click [Add to Favorites] of the item under it If you click it, Heroku will be in your favorite item on the left as shown in the image below. It will be added. ** ** If you like it, you can always select Heroku and connect to it in the future You can check the DB of Heroku.
*** If you connect Heroku and Sequel, you can check the operation of the production environment. You can also check the DB information at the same time, so you can check the operation in the production environment more reliably. Isn't it possible? *** ***
Recommended Posts