From e12715bfd55831a84e9398280fb294d9136ede2e Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 9 Jul 2017 10:13:11 +0900 Subject: 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 --- railties/lib/rails/commands/dbconsole/dbconsole_command.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails/commands/dbconsole/dbconsole_command.rb') 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 -- cgit v1.2.3