diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-09 10:13:11 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-09 13:18:56 +0900 |
commit | e12715bfd55831a84e9398280fb294d9136ede2e (patch) | |
tree | e268d9b721d436291a5b7278368a60ddb1cb1cee /railties/lib/rails | |
parent | 650ea5e5cf50d8a7242499463cf1762922d330a8 (diff) | |
download | rails-e12715bfd55831a84e9398280fb294d9136ede2e.tar.gz rails-e12715bfd55831a84e9398280fb294d9136ede2e.tar.bz2 rails-e12715bfd55831a84e9398280fb294d9136ede2e.zip |
Load environment file in `dbconsole` command
Currently the environment file is not loaded in `dbconsole` command.
Therefore, for example, if use encrypted secrets values in database.yml,
`read_encrypted_secrets` will not be true, so the value can not be
used correctly.
Fixes #29717
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/commands/dbconsole/dbconsole_command.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb index 5db588b66a..b3df5191c6 100644 --- a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb +++ b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb @@ -148,6 +148,7 @@ module Rails def perform extract_environment_option_from_argument + require_application_and_environment! Rails::DBConsole.start(options) end end |